@ 2014-04-28T13:40:17Z <?php
class Report_Filter
{
public $And_Or;
public $Report_Field_ID;
public $Comparison;
public $Value;
}
class Report_Order_By
{
public $Report_Field_ID;
public $Direction;
}
class Text_Export_Formatting
{
public $Field_Delimiter = ",";
public $Text_Qualifier = "\"";
public $Include_Headers = true;
public $Apply_Delimiter_To_Headers = true;
public $Apply_Qualifier_To_Headers = true;
public $Fixed_Width = false;
public $Fixed_Widths = array(); // array with Fixed_Width_Info objects
}
class Fixed_Width_Info
{
public $Report_Field_ID;
public $Column_Width;
}
class Column_Formatting
{
public $Report_Field_ID;
public $Bold;
public $Italic;
public $Underline;
public $Alignment;
public $Data_Type; // Data_Type type
public $Summary_Type; // Summary_Type type
public $Total;
public $Pivot_Table_Field;
}
class Header_Formatting
{
public $Report_Field_ID;
public $Bold;
public $Italic;
public $Underline;
public $Alignment;
}
class Excel_Export_Formatting
{
public $Type;
public $Include_Headers;
public $Include_Data_Tab;
public $Header_Format = array(); // array of Header_Formatting objects
public $Column_Format = array(); // array of Column_Formatting objects
public $Table_Theming;
}
class Delivery_Method
{
public $Type;
public $Share_Drive_Info;
public $EMail_Info;
public $FTP_Info;
}
class FTP_Information
{
public $Secure;
public $Address;
public $Port;
public $Path;
public $Username;
public $Password;
}
class EMail_Information
{
public $Recipient;
public $CC_Recipient;
public $BCC_Recipient;
public $Subject;
public $Body;
}
class Share_Drive_Information
{
public $Address;
public $Username;
public $Password;
}
class ReportSettings
{
public $Report_Platform_ID = null;
public $Report_Type_ID = null;
public $Zip_File = null;
public $Encrypt_File = null;
public $AES_Encrypt = null;
public $Encrypt_Password = "RANDOM PASSWORD";
public $Export_Filename = null;
public $Export_Type = "Text";
public $Report_Field_IDs = array(); // array with native type
/* Requires setter methods */
// Setter method: setReportFilters()
public $Report_Filters = array(); // array with Report_Filter objects
// Setter method: setReportOrderBy()
public $Report_Order_Bys = array(); // array with Report_Order_By objects
// Setter method: setTextExport()
public $Text_Export;
// Setter method: setExcelExport()
public $Excel_Export;
// Setter method: setDeliveryMethod()
public $Delivery_Methods;
public function setReportFilters($data)
{
foreach($data as $d)
{
$o = new Report_Filter();
$o->Report_Field_ID = $d['Report_Field_ID'];
$o->Comparison = $d['Comparison'];
$o->Value = $d['Value'];
$o->And_Or = $d['And_Or'];
$this->Report_Filters[] = $o;
}
}
public function setReportOrderBy($data)
{
foreach($data as $d)
{
$o = new Report_Order_By();
$o->Report_Field_ID = $d['Report_Field_ID'];
$o->Direction = $d['Direction'];
$this->Report_Order_Bys[] = $o;
}
}
public function setTextExport($data)
{
$o = new Text_Export_Formatting();
$o->Field_Delimiter = $data['Field_Delimiter'];
$o->Text_Qualifier = $data['Text_Qualifier'];
$o->Apply_Delimiter_To_Headers = $data['Apply_Delimiter_To_Headers'];
$o->Apply_Qualifier_To_Headers = $data['Apply_Qualifier_To_Headers'];
$o->Include_Headers = $data['Include_Headers'];
$o->Fixed_Width = $data['Fixed_Width'];
if($data['Fixed_Width'])
{
foreach ($data['Fixed_Widths'] as $w)
{
$fw = new Fixed_Width_Info();
$fw->Column_Width = $w['Column_Width'];
$fw->Report_Field_ID = $w['Report_Field_ID'];
$o->Fixed_Widths[] = $fw;
}
}
}
public function setExcelExport($data)
{
$o = new Excel_Export_Formatting();
$o->Type = $data['Type'];
$o->Include_Headers = $data['Include_Headers'];
$o->Include_Data_Tab = $data['Include_Data_Tab'];
if($data['Header_Format'])
{
foreach ($data['Header_Format'] as $d)
{
$hf = new Header_Formatting();
$hf->Report_Field_ID = $d['Report_Field_ID'];
$hf->Alignment = $d['Alignment'];
$hf->Bold = $d['Bold'];
$hf->Italic = $d['Italic'];
$hf->Underline = $d['Underline'];
$o->Column_Format[] = $hf;
}
}
if($data['Column_Format'])
{
foreach ($data['Column_Format'] as $d)
{
$cf = new Column_Formatting();
$cf->Report_Field_ID = $d['Report_Field_ID'];
$cf->Alignment = $d['Alignment'];
$cf->Bold = $d['Bold'];
$cf->Italic = $d['Italic'];
$cf->Data_Type = $d['Data_Type'];
$cf->Underline = $d['Underline'];
$cf->Summary_Type = $d['Summary_Type'];
$cf->Total = $d['Total'];
$o->Column_Format[] = $cf;
}
}
}
public function setDeliveryMethod($data)
{
$o = new Delivery_Method();
$o->Type = $data['Type'];
switch ($data['Type'])
{
case 'ftp' :
$f = new FTP_Information();
$f->Address = $data['Address'];
$f->Path = $data['Path'];
$f->Port = $data['Port'];
$f->Username = $data['Username'];
$f->Password = $data['Password'];
$f->Secure = $data['Secure'];
$o->FTP_Info = $f;
break;
case 'email' :
$e = new EMail_Information();
$e->Subject = $data['Subject'];
$e->Recipient = $data['Recipient'];
$e->CC_Recipient = $data['CC_Recipient'];
$e->BCC_Recipient = $data['BCC_Recipient'];
$e->Body = $data['Body'];
$o->EMail_Info = $e;
break;
case 'shared':
$s = new Share_Drive_Information();
$s->Username = $data['Username'];
$s->Password = $data['Password'];
$s->Address = $data['Address'];
$o->Share_Drive_Info = $s;
break;
default:
}
}
} // class
/*****************************************************************************************************************************/
$array = array();
$report = new ReportSettings();
$report->Report_Platform_ID = '11';
$report->Report_Type_ID = '11';
$report->Zip_File = 'true';
$report->Encrypt_File = 'true';
$report->AES_Encrypt = 'true';
$report->Encrypt_Password = "RANDOM PASSWORD";
$report->Export_Filename = "myexport_filename.txt";
$report->Export_Type = "Text";
$report->setTextExport(array(
'Field_Delimiter' => ',',
'Text_Qualifier' => '"',
'Apply_Delimiter_To_Headers' => 'true'
'Apply_Qualifier_To_Headers' => 'true',
'Include_Headers' => 'true',
'Fixed_Width' => 'true'
));
$fixed_widths = array(
array(
'Column_Width' => '50',
'Report_Field_ID' => '24'
),
array(
'Column_Width' => '50',
'Report_Field_ID' => '31'
),
array(
'Column_Width' => '50',
'Report_Field_ID' => '21'
),
array(
'Column_Width' => '50',
'Report_Field_ID' => '56'
)
);
$report->setTextExport(array(
'Fixed_Widths' => $fixed_widths
));
$report->setDeliveryMethod(array(
'Type' => "ftp",
'Address' => "169.111.222.1",
'Path' => "/home/htdocs/uploads",
'Port' => "22",
'Username' => "myftpuser",
'Password' => "pazzwordz",
'Secure' => "false"
));
var_dump($report);
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Version System time (s) User time (s) Memory (MiB) 5.4.27 0.006 0.037 12.48 5.4.26 0.002 0.041 12.48 5.4.25 0.006 0.037 12.48 5.4.24 0.004 0.039 12.48 5.4.23 0.005 0.039 12.47 5.4.22 0.008 0.036 12.48 5.4.21 0.005 0.036 12.48 5.4.20 0.009 0.035 12.48 5.4.19 0.011 0.033 12.47 5.4.18 0.010 0.037 12.47 5.4.17 0.006 0.035 12.48 5.4.16 0.006 0.037 12.48 5.4.15 0.003 0.039 12.47 5.4.14 0.004 0.039 12.16 5.4.13 0.004 0.037 12.14 5.4.12 0.007 0.033 12.11 5.4.11 0.003 0.038 12.11 5.4.10 0.005 0.041 12.10 5.4.9 0.006 0.038 12.11 5.4.8 0.005 0.039 12.11 5.4.7 0.004 0.038 12.10 5.4.6 0.005 0.041 12.11 5.4.5 0.008 0.034 12.10 5.4.4 0.005 0.038 12.08 5.4.3 0.006 0.035 12.08 5.4.2 0.004 0.037 12.07 5.4.1 0.010 0.033 12.08 5.4.0 0.005 0.037 11.57 5.3.28 0.008 0.038 12.73 5.3.27 0.007 0.039 12.75 5.3.26 0.005 0.040 12.75 5.3.25 0.005 0.044 12.75 5.3.24 0.007 0.037 12.74 5.3.23 0.008 0.039 12.73 5.3.22 0.002 0.042 12.70 5.3.21 0.006 0.038 12.70 5.3.20 0.007 0.035 12.70 5.3.19 0.008 0.036 12.71 5.3.18 0.008 0.035 12.70 5.3.17 0.007 0.037 12.70 5.3.16 0.011 0.045 12.70 5.3.15 0.005 0.049 12.70 5.3.14 0.005 0.041 12.70 5.3.13 0.006 0.040 12.69 5.3.12 0.011 0.049 12.68 5.3.11 0.002 0.045 12.69 5.3.10 0.006 0.044 12.18 5.3.9 0.006 0.037 12.15 5.3.8 0.007 0.035 12.14 5.3.7 0.006 0.037 12.14 5.3.6 0.008 0.035 12.13 5.3.5 0.008 0.040 12.07 5.3.4 0.008 0.040 12.07 5.3.3 0.005 0.036 12.04 5.3.2 0.004 0.042 11.82 5.3.1 0.005 0.039 11.78 5.3.0 0.004 0.037 11.77
preferences:dark mode live preview
141.07 ms | 1394 KiB | 7 Q