public function write(ServerSerializationStreamWriter $stream, $instance, MappedClass $instanceClass = null) { $stream->writeInt(count($instance)); for ($i = 0, $n = count($instance); $i < $n; ++$i) { $stream->writeObject($instance[$i], $instanceClass->getComponentType()); } }
public function write(ServerSerializationStreamWriter $stream, $instance) { $stream->writeInt(count($instance)); for ($i = 0, $n = count($instance); $i < $n; ++$i) { $stream->writeObject($instance[$i]); } }