public function init($streamWrapper = self::STREAM_WRAPPER_TEMP, $maxMemory = 5242880)
    {

        // weather we've already set a filename open the input stream
        if ($tmpFilename = $this->getTmpFilename()) {
            if (!$this->inputStream = fopen($tmpFilename, 'r+')) {
                throw new \Exception(sprintf('Can\'t open input temporary filename %s', $tmpFilename));
            }
        } else {
            if (!$this->inputStream = fopen($streamWrapper . '/maxmemory:' . $maxMemory, 'r+')) {
                throw new \Exception(sprintf('Can\'t open stream wrapper %s', $streamWrapper));
            }
        }
    }
public function init($streamWrapper = self::STREAM_WRAPPER_TEMP, $maxMemory = 5242880)
    {

        // weather we've already set a filename open the input stream
        if ($tmpFilename = $this->getTmpFilename()) {
            if (!$this->inputStream = fopen($tmpFilename, 'r+')) {
                throw new \Exception(sprintf('Can\'t open input temporary filename %s', $tmpFilename));
            }
        } else {
            if (!$this->inputStream = fopen($streamWrapper . '/maxmemory:' . $maxMemory, 'r+')) {
                throw new \Exception(sprintf('Can\'t open stream wrapper %s', $streamWrapper));
            }
        }
    }
public function init ( $ streamWrapper = self :: STREAM_WRAPPER_TEMP , $ maxMemory = 5242880 ) { // weather we've already set a filename open the input stream if ( $ tmpFilename = $ this -> getTmpFilename ( ) ) { if ( ! $ this -> inputStream = fopen ( $ tmpFilename , 'r+' ) ) { throw new \ Exception ( sprintf ( 'Can\'t open input temporary filename %s' , $ tmpFilename ) ) ; } } else { if ( ! $ this -> inputStream = fopen ( $ streamWrapper . '/maxmemory:' . $ maxMemory , 'r+' ) ) { throw new \ Exception ( sprintf ( 'Can\'t open stream wrapper %s' , $ streamWrapper ) ) ; } } }
Initiates a http form part object

@param string  $streamWrapper The stream wrapper to use per default temp stream wrapper
@param integer $maxMemory     Maximum memory in bytes per default to 5 MB

@throws \Exception
@return void
Initiates a http form part object