/**
  *
  * @param string $type
  * @param StdObject $stdObject
  * @return ssrs Object
  */
 protected function FromStdObject_Base($type, $stdObject)
 {
     $object;
     if ($type != 'self') {
         $class = new ReflectionClass($type);
         $object = $class->newInstance();
     } else {
         $type = get_class($this);
         $class = new ReflectionClass($type);
         $object = $this;
     }
     $properties = $class->getProperties();
     foreach ($properties as $rawProperty) {
         $propertyName = $rawProperty->name;
         $property = new ReflectionProperty($object, $propertyName);
         $attributes = Utility::getAttributes($property);
         $value = null;
         switch (SSRSTypeFactory::GetType($attributes['type'])) {
             case 'basic':
                 $value = self::EnumerateBasicObject($stdObject, $propertyName, $attributes);
                 break;
             case 'ssrs':
                 $value = self::EnumerateSSRSObject($stdObject, $propertyName, $attributes);
                 break;
             case 'unknown':
                 throw new PReportException("", "Exception: Unknown_Type:" . $attributes['type']);
                 break;
         }
         $property->setValue($object, $value);
     }
     $object->Initialize();
     return $object;
 }
Example #2
0
 /**
  *
  * @param <string> $ToggleID The ID of the item to toggle.
  */
 public function ToggleItem($ToggleID)
 {
     $parameters = array("ToggleID" => $ToggleID);
     try {
         $this->SetSessionId(true);
         $stdObject = $this->_soapHandle_Exe->ToggleItem($parameters);
         $toggleItemResponse = SSRSTypeFactory::CreateSSRSObject('ToggleItemResponse', $stdObject);
         return $toggleItemResponse->Found;
     } catch (SoapFault $soapFault) {
         self::ThrowReportException($soapFault);
     }
 }