* Append bytes to this buffer. * (Nothing more is needed to support Avro.) * @param string $arg bytes to write * @returns int count of bytes written. * @throws AvroIOException if $args is not a string value. */
($arg)
| 70 | * @throws AvroIOException if $args is not a string value. |
| 71 | */ |
| 72 | public function write($arg) |
| 73 | { |
| 74 | $this->checkClosed(); |
| 75 | if (is_string($arg)) { |
| 76 | return $this->appendStr($arg); |
| 77 | } |
| 78 | throw new AvroIOException( |
| 79 | sprintf( |
| 80 | 'write argument must be a string: (%s) %s', |
| 81 | gettype($arg), |
| 82 | var_export($arg, true) |
| 83 | ) |
| 84 | ); |
| 85 | } |
| 86 | |
| 87 | /** |
| 88 | * @throws AvroIOException if the buffer is closed. |
nothing calls this directly
no test coverage detected