public function unserialize($serialized)
	{
		$this->tokens = [];

		$tokenFactory = $this->getTokenFactory();
		$it = new SerializedTokenIterator(json_decode($serialized, true));

		$this->preUnserialize($it);

		while($it->valid())
		{
			$this->tokens[] = $tokenFactory->createToken($it);
		}

		$this->postUnserialize($it);
	}
public function unserialize($serialized)
	{
		$this->tokens = [];

		$tokenFactory = $this->getTokenFactory();
		$it = new SerializedTokenIterator(json_decode($serialized, true));

		$this->preUnserialize($it);

		while($it->valid())
		{
			$this->tokens[] = $tokenFactory->createToken($it);
		}

		$this->postUnserialize($it);
	}
public function unserialize ( $ serialized ) { $ this -> tokens = [ ] ; $ tokenFactory = $ this -> getTokenFactory ( ) ; $ it = new SerializedTokenIterator ( json_decode ( $ serialized , true ) ) ; $ this -> preUnserialize ( $ it ) ; while ( $ it -> valid ( ) ) { $ this -> tokens [ ] = $ tokenFactory -> createToken ( $ it ) ; } $ this -> postUnserialize ( $ it ) ; }
Reads a serialized token container and reconstitus all token objects.

@param string $serialized
Reads a serialized token container and reconstitus all token objects .