Пример #1
0
 /**
  * Sets the size of a stream's buffer.
  * 
  * @param int $size      The desired size of the buffer, in bytes.
  * @param int $direction The buffer of which direction to set. Valid
  *     values are the DIRECTION_* constants.
  * 
  * @return bool TRUE on success, FALSE on failure.
  */
 public function setBuffer($size, $direction = self::DIRECTION_ALL)
 {
     $result = parent::setBuffer($size, $direction);
     if (self::DIRECTION_SEND === $direction && function_exists('stream_set_chunk_size') && !$result) {
         return false !== @stream_set_chunk_size($this->stream, $size);
     }
     return $result;
 }