/**
  * looks at the response and sets the explicit type field so that the serializer sends it properly
  * @param mixed $deserializedResponse
  * @return mixed
  */
 public function filterDeserializedResponse($deserializedResponse)
 {
     $deserializedResponse = Amfphp_Core_Amf_Util::applyFunctionToContainedObjects($deserializedResponse, array($this, 'convertStringFromPhpToClientCharsets'));
     if (class_exists('AmfphpMonitor', false)) {
         AmfphpMonitor::addTime('Response Charset Conversion');
     }
     return $deserializedResponse;
 }
Пример #2
0
 /**
  * looks at the outgoing packet and sets the explicit type field so that the serializer sends it properly
  * @param mixed $deserializedResponse
  * @return mixed
  */
 public function filterDeserializedResponse($deserializedResponse)
 {
     $ret = null;
     if ($this->scanEnabled) {
         $ret = Amfphp_Core_Amf_Util::applyFunctionToContainedObjects($deserializedResponse, array($this, 'markExplicitType'));
     }
     if (class_exists('AmfphpMonitor', false)) {
         AmfphpMonitor::addTime('Response Value Object Conversion');
     }
     return $ret;
 }
 /**
  * looks at the outgoing packet and sets the explicit type field so that the serializer sends it properly
  * @param mixed $deserializedResponse
  * @return mixed
  */
 public function filterDeserializedResponse($deserializedResponse)
 {
     $deserializedResponse = Amfphp_Core_Amf_Util::applyFunctionToContainedObjects($deserializedResponse, array($this, "markExplicitType"));
     return $deserializedResponse;
 }
Пример #4
0
 /**
  * looks at the response and sets the explicit type field so that the serializer sends it properly
  * @param mixed $deserializedResponse
  * @return mixed
  */
 public function filterDeserializedResponse($deserializedResponse)
 {
     $deserializedResponse = Amfphp_Core_Amf_Util::applyFunctionToContainedObjects($deserializedResponse, array($this, "convertStringFromPhpToClientCharsets"));
     return $deserializedResponse;
 }
Пример #5
0
 /**
  * test apply function to contained objects
  */
 public function testApplyFunctionToContainedObjects()
 {
     //non object
     $this->counter = 0;
     Amfphp_Core_Amf_Util::applyFunctionToContainedObjects('bla', array($this, 'testApplyFunc'));
     $this->assertEquals(1, $this->counter);
     //simple
     $testObj1 = array();
     $testObj1[] = new stdClass();
     $this->counter = 0;
     Amfphp_Core_Amf_Util::applyFunctionToContainedObjects($testObj1, array($this, 'testApplyFunc'));
     $this->assertEquals(2, $this->counter);
     //a bit more complicated
     $testObj2 = new stdClass();
     $subObj = array(new stdClass(), new stdClass(), array(1, 2, false), null);
     $testObj2->data = $subObj;
     $testObj2->bla = 'bla';
     $this->counter = 0;
     Amfphp_Core_Amf_Util::applyFunctionToContainedObjects($testObj2, array($this, 'testApplyFunc'));
     $this->assertEquals(10, $this->counter);
 }
 /**
  * looks at the outgoing packet and sets the explicit type field so that the serializer sends it properly
  * @param mixed $deserializedResponse
  * @return mixed
  */
 public function filterDeserializedResponse($deserializedResponse)
 {
     $deserializedResponse = Amfphp_Core_Amf_Util::applyFunctionToContainedObjects($deserializedResponse, array($this, 'markExplicitType'));
     //		file_put_contents("rawdata.txt", serialize($deserializedResponse));
     return $deserializedResponse;
 }