<?php
/***************************************************************
* Copyright notice
*
* (c) 2013 FTI eCom GmbH
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
/**
* Diese Klasse bereitet die Daten für das Chart auf
*
* @author Daniel Siekiera <daniel.siekiera@fti-ecom.de>
*/
class ChartData {
/**
* Daten die dann auf das Chart kommen
*
* @var arrays
*/
public $data;
/**
* __construct
*
* Initialfunktion
*
* @var arrays
*/
function __construct() {
$this->data = new stdClass();
}
/**
* addCords
*
* erzeugt ein neues Array für einen Datensatz
*
* @param string $name
* @param array $data
* @param string $type
* @return void
*/
public function addCords(string $name, array $data_array = NULL, string $type = NULL){
if(empty($data) && empty($name))
return false;
// $data ist ein Array, durchsteppen
if(is_array($data)){
foreach($data as $val)
$this->data->cords->{$name}->data = (object)$val;
} else
$this->data->cords->{$name}->data = (object)$data;
// Anzahl der Elemente zählen
$this->data->cords->{$name}->size = sizeof($data);
// das größte Element ermitteln
$this->data->cords->{$name}->max = max($data);
// das kleinste Element ermitteln
$this->data->cords->{$name}->min = min($data);
// Default Form festlegen
$this->data->cords->{$name}->form = $type;
// leere Array definieren
$this->data->cords->{$name}->colors = (object)array('bar' => '',
'label' => '');
// leere Array definieren
$this->data->cords->{$name}->legend = (object)array('angle' => '',
'font_size' => '',
'font_file' => '');
}
}
Parse error: parse error, unexpected T_ARRAY, expecting '&' or T_VARIABLE in /in/rlMvj on line 60
Process exited with code 255.
Output for 4.4.2 - 4.4.9
Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/rlMvj on line 37
Process exited with code 255.
Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /in/rlMvj on line 37
Process exited with code 255.
Output for 4.3.2 - 4.3.4
Parse error: parse error, expecting `T_OLD_FUNCTION' or `T_FUNCTION' or `T_VAR' or `'}'' in /in/rlMvj on line 37
Process exited with code 255.