Writes The provided content to this output stream.
@param mixed $content
@throws InvalidContentException
969678
public function write($content) {
        if (is_string($content) || is_numeric($content)) {
            $this->writeString($content);
        } elseif (is_bool($content)) {
            $this->writeString($content ? "TRUE" : "FALSE");
        } elseif (is_array($content)) {
            $this->writeString("Array(" . count($content) . ")");
        } elseif (is_object($content) && method_exists($content, "__toString")) {
            $this->writeString(strval($content));
        } elseif (is_null($content)) {
            $this->writeString("NULL");
        } elseif (is_resource($content)) {
            $this->writeString("Resource###");
        } else {
            throw new InvalidContentException();
        }
    }
454502
public function write($content)
    {
        if (!$this->isOpen()) {
            $this->open();
        }

        return fwrite($this->stream, $content);
    }
252612
public function setContent($content)
    {
        if (empty($content) || !is_string($content)) {
            throw new BuildException('Content must be a non-empty string');
        }

        $this->_content = $content;
    }
123590
public static function create(string $content): InvalidContentException
    {
        $template = 'Content of template \'%s\' is invalid. Did you use string with 1 placeholder at least?';
        $message = sprintf($template, $content);

        return new static($message);
    }
631821
protected function write($content): bool
    {
        if ($content === false || $content === null) {
            return false;
        }

        return \is_resource($content)
            ? $this->filesystem->putStream($this->path, $content)
            : $this->filesystem->put($this->path, $content);
    }
529434
protected function _write($path, $content)
    {
        $File = new File($path);
        $File->write($content);
        $File->exists();
    }
992387
public function write($content)
    {
        if ($this->isReadable()) {
            throw new \RuntimeException("Cannot write to a readable message");
        }

        $this->writable = true;
        $content = trim($content);
        fwrite($this->resource, $content . "\n");
    }
978646
public function writeBase64 ($content)
    {
        $parts = explode(',', $content);
        if(count($parts) > 1) {
            $base64_encoded = $parts[1];
            $this->writeOver(base64_decode($base64_encoded));
            return self::FILE_CREATE_SUCCESS;
        } else {
            return self::FILE_CREATE_ERROR;
        }

    }
311961
public function saveContent($key, $content)
    {
        $this->master->getFilesystem()->write($key, $content, true);

        foreach ($this->slaves as $slave) {
            $slave->getFilesystem()->write($key, $content, true);
        }
    }
954953
public function setContent( $content )
	{
		if( $this->content === (string) $content )
			return FALSE;
		$this->content = (string) $content;
		return TRUE;
	}
905382
protected function _save($content) {
        if (!file_put_contents($this->_getIncludesFilename(), $content)) {
            throw new Exception(sprintf(self::EXCEPTION_WRITE_ERROR));
        }
        return true;
    }
816556
public function writeFile(
        string $content,
        string $filename,
        string $encoding = Encoder::DEFAULT_BYTE_MODE_ECODING,
        ?ErrorCorrectionLevel $ecLevel = null
    ) : void {
        file_put_contents($filename, $this->writeString($content, $encoding, $ecLevel));
    }
1009725
public function writeContent(array $content)
    {
        if (!$this->canWrite()) {
            throw new Exception("Unable to write file {this->file}.");
        }
        
        $json = $this->jsonEncode($content);
        
        return $this->writeFileContent($this->file, $json);
    }
1056467
public function write($content)
    {
        if ($handle = fopen($this->path, "w+")) {
            if (!fwrite($handle, $content)) {
                fclose($handle);

                $this->clear();

                throw new IOException(sprintf('Failed to write in temp file "%s"', $this->path));
            }

            fclose($handle);
            chmod($this->path, 0755);
        } else {
            $this->clear();

            throw new IOException(sprintf('Failed to open temp file "%s"', $this->path));
        }

        return $this;
    }
712508
public function indexContent(Content $content)
    {
        $fullTextValue = $this->mapper->mapContent($content);

        $this->indexerGateway->index($fullTextValue);
    }
1343318
public function write( $path, $content )
	{
		try {
			$this->fs->put( $path, $content );
		} catch( \Exception $e ) {
			throw new Exception( $e->getMessage(), 0, $e );
		}
	}
402592
protected function write($destination, $content)
    {
        $directory = dirname($destination);

        if ( ! $this->files->exists($directory)) {
            $this->files->makeDirectory($directory, 0755, true);
        }

        return (bool) $this->files->put($destination, $content);
    }