original_string: public function deserialize($serializedPage, $format)
      {
          // check if supported deserialization format
          if (!SerpPageSerializerHelper::validFormat($format, self::$supportedFormatDeserialization))
              throw new \Franzip\SerpPageSerializer\Exceptions\UnsupportedDeserializationFormatException('Invalid SerpPageSerializer $format: supported deserialization formats are JSON and XML.');
          // TODO: typecheck object
          if (!SerpPageSerializerHelper::deserializablePage($serializedPage))
              throw new \Franzip\SerpPageSerializer\Exceptions\RuntimeException('Invalid SerpPageSerializer $serializedPage: you must supply a SerializedSerpPage object to deserialize.');
  
          $format = strtolower($format);
          $targetClass = self::SERIALIZABLE_OBJECT_PREFIX . strtoupper($format);
          return $this->getSerializer()->deserialize($serializedPage->getContent(), $targetClass, $format);
      }
code: public function deserialize($serializedPage, $format)
      {
          // check if supported deserialization format
          if (!SerpPageSerializerHelper::validFormat($format, self::$supportedFormatDeserialization))
              throw new \Franzip\SerpPageSerializer\Exceptions\UnsupportedDeserializationFormatException('Invalid SerpPageSerializer $format: supported deserialization formats are JSON and XML.');
          // TODO: typecheck object
          if (!SerpPageSerializerHelper::deserializablePage($serializedPage))
              throw new \Franzip\SerpPageSerializer\Exceptions\RuntimeException('Invalid SerpPageSerializer $serializedPage: you must supply a SerializedSerpPage object to deserialize.');
  
          $format = strtolower($format);
          $targetClass = self::SERIALIZABLE_OBJECT_PREFIX . strtoupper($format);
          return $this->getSerializer()->deserialize($serializedPage->getContent(), $targetClass, $format);
      }
code_tokens: public function deserialize ( $ serializedPage , $ format ) { // check if supported deserialization format if ( ! SerpPageSerializerHelper :: validFormat ( $ format , self :: $ supportedFormatDeserialization ) ) throw new \ Franzip \ SerpPageSerializer \ Exceptions \ UnsupportedDeserializationFormatException ( 'Invalid SerpPageSerializer $format: supported deserialization formats are JSON and XML.' ) ; // TODO: typecheck object if ( ! SerpPageSerializerHelper :: deserializablePage ( $ serializedPage ) ) throw new \ Franzip \ SerpPageSerializer \ Exceptions \ RuntimeException ( 'Invalid SerpPageSerializer $serializedPage: you must supply a SerializedSerpPage object to deserialize.' ) ; $ format = strtolower ( $ format ) ; $ targetClass = self :: SERIALIZABLE_OBJECT_PREFIX . strtoupper ( $ format ) ; return $ this -> getSerializer ( ) -> deserialize ( $ serializedPage -> getContent ( ) , $ targetClass , $ format ) ; }
docstring: Deserialize a serialized page.
  YAML deserialization is not currently supported.
  @param  SerializedSerpPage   $serializedPage
  @param  string               $format
  @return SerializableSerpPage
docstring_tokens: Deserialize a serialized page . YAML deserialization is not currently supported .