diff options
author | arron.woods <arron.woods@deae1e92-32f9-c189-e222-5b9b5081a27a> | 2011-04-21 17:51:36 +0000 |
---|---|---|
committer | arron.woods <arron.woods@deae1e92-32f9-c189-e222-5b9b5081a27a> | 2011-04-21 17:51:36 +0000 |
commit | 4208d61e5476d83482887255c342205832dbf9b1 (patch) | |
tree | 2ebddf52df8c5486c63d68292da957f8f6c10685 | |
parent | d855c85f1609621a346041865a65b52caa47fa69 (diff) | |
download | php-ssrs-4208d61e5476d83482887255c342205832dbf9b1.zip php-ssrs-4208d61e5476d83482887255c342205832dbf9b1.tar.gz php-ssrs-4208d61e5476d83482887255c342205832dbf9b1.tar.bz2 |
Execution parameters when given a report parameters object
-rwxr-xr-x | build.xml | 60 | ||||
-rwxr-xr-x | library/SSRS/Object/ExecutionParameters.php | 12 |
2 files changed, 70 insertions, 2 deletions
diff --git a/build.xml b/build.xml new file mode 100755 index 0000000..620ca1c --- /dev/null +++ b/build.xml @@ -0,0 +1,60 @@ +<?xml version="1.0" encoding="UTF-8"?> + <project name="php-ssrs" basedir="." default="app"> + <property name="builddir" value="${ws}/build" /> + + <target name="clean"> + <echo msg="Clean..." /> + <delete dir="${builddir}" /> + </target> + + <target name="prepare"> + <echo msg="Prepare..." /> + <mkdir dir="${builddir}" /> + <mkdir dir="${builddir}/logs" /> + <mkdir dir="${builddir}/logs/coverage" /> + <mkdir dir="${builddir}/docs" /> + </target> + + <!-- Deploy app --> + <target name="app"> + <echo msg="Prepare app..." /> + </target> + + <!-- PHP API Documentation --> + <target name="phpdoc"> + <echo msg="PHP Documentor..." /> + <phpdoc title="API Documentation" + destdir="${builddir}/docs" + sourcecode="yes" + defaultpackagename="php-ssrs" + output="HTML:Smarty:PHP"> + <fileset dir="source"> + <include name="**/*.php" /> + </fileset> + </phpdoc> + </target> + + <!-- PHP copy/paste analysis --> + <target name="phpcpd"> + <echo msg="PHP Copy/Paste..." /> + <exec command="phpcpd --log-pmd '${builddir}/logs/pmd.xml' source" escape="false" /> + </target> + + <!-- PHP dependency checker --> + <target name="pdepend"> + <echo msg="PHP Depend..." /> + <exec command="pdepend --jdepend-xml='${builddir}/logs/jdepend.xml' '${ws}/source'" escape="false" /> + </target> + + <!-- PHP CodeSniffer --> + <target name="phpcs"> + <echo msg="PHP CodeSniffer..." /> + <exec command="phpcs --tab-width=4 --extensions=php --standard=PHPCS --report=checkstyle '${ws}/source' > '${builddir}/logs/checkstyle.xml'" escape="false" /> + </target> + + <!-- Unit Tests & coverage analysis --> + <target name="phpunit"> + <echo msg="PHP Unit..." /> + <exec command="phpunit --log-junit '${builddir}/logs/phpunit.xml' --coverage-clover '${builddir}/logs/coverage/clover.xml' '${ws}/source/tests'" /> + </target> +</project> diff --git a/library/SSRS/Object/ExecutionParameters.php b/library/SSRS/Object/ExecutionParameters.php index b107438..3dd8668 100755 --- a/library/SSRS/Object/ExecutionParameters.php +++ b/library/SSRS/Object/ExecutionParameters.php @@ -5,10 +5,18 @@ * * @author andrew */ -class SSRS_Object_ExecutionParameters extends SSRS_Object_ArrayIterator{ +class SSRS_Object_ExecutionParameters extends SSRS_Object_ArrayIterator { public $iteratorKey = 'Parameters'; + public function __construct($data = null) { + parent::__construct($data); + + if ($data instanceof SSRS_Object_ReportParameters) { + $this->setParameters($data); + } + } + public function init() { $this->data['Parameters'] = array(); } @@ -23,7 +31,7 @@ class SSRS_Object_ExecutionParameters extends SSRS_Object_ArrayIterator{ } } - public function getParameterArrayForSoapCall(){ + public function getParameterArrayForSoapCall() { $execParams = array(); foreach ($this AS $parameter) { $execParams[] = array( |