summaryrefslogtreecommitdiffstats
path: root/library/SSRS/Object/ReportParameter.php
diff options
context:
space:
mode:
Diffstat (limited to 'library/SSRS/Object/ReportParameter.php')
-rwxr-xr-xlibrary/SSRS/Object/ReportParameter.php35
1 files changed, 33 insertions, 2 deletions
diff --git a/library/SSRS/Object/ReportParameter.php b/library/SSRS/Object/ReportParameter.php
index 32ea31a..0b70710 100755
--- a/library/SSRS/Object/ReportParameter.php
+++ b/library/SSRS/Object/ReportParameter.php
@@ -15,9 +15,19 @@ class SSRS_Object_ReportParameter extends SSRS_Object_Abstract {
public $name;
public $value;
+ public function getDefaultValue() {
+ $default = null;
+
+ if (key_exists('DefaultValues', $this->data)) {
+ $default = $this->data['DefaultValues']->Value;
+ }
+
+ return in_array($default, $this->getValidValues()) ? $default : null;
+ }
+
public function getValidValues() {
- $data = false;
-
+ $data = array();
+
if (key_exists('ValidValues', $this->data)) {
$data = array();
@@ -37,4 +47,25 @@ class SSRS_Object_ReportParameter extends SSRS_Object_Abstract {
return $data;
}
+ public function hasDependencies() {
+ return (isset($this->data['Dependencies']->Dependency)
+ && !empty($this->data['Dependencies']->Dependency));
+ }
+
+ public function getDependencies() {
+ return (array) $this->data['Dependencies']->Dependency;
+ }
+
+ public function hasOutstandingDependencies() {
+ return ($this->getState() == 'HasOutstandingDependencies');
+ }
+
+ public function getState() {
+ return key_exists('State', $this->data) ? $this->data['State'] : null;
+ }
+
+ public function isMultiValue() {
+ return !empty($this->data['MultiValue']);
+ }
+
}