public static function toProtobuf($object, $filter = NULL)
	{
		$output = '';

		if (isset($object->fileToGenerate) && ($filter === null || isset($filter['fileToGenerate']))) {
			foreach ($object->fileToGenerate instanceof \Traversable ? $object->fileToGenerate : (array)$object->fileToGenerate as $k => $v) {
				$output .= "\x0a";
				$output .= Binary::encodeVarint(strlen($v));
				$output .= $v;
			}
		}

		if (isset($object->parameter) && ($filter === null || isset($filter['parameter']))) {
			$output .= "\x12";
			$output .= Binary::encodeVarint(strlen($object->parameter));
			$output .= $object->parameter;
		}

		if (isset($object->protoFile) && ($filter === null || isset($filter['protoFile']))) {
			foreach ($object->protoFile instanceof \Traversable ? $object->protoFile : (array)$object->protoFile as $k => $v) {
				$output .= "\x7a";
				$buffer = FileDescriptorProtoMeta::toProtobuf($v, $filter === null ? null : $filter['protoFile']);
				$output .= Binary::encodeVarint(strlen($buffer));
				$output .= $buffer;
			}
		}

		return $output;
	}