mirror of
https://github.com/code-rhapsodie/versioning-bundle.git
synced 2026-03-24 06:42:18 +01:00
35 lines
546 B
PHP
35 lines
546 B
PHP
<?php
|
|
|
|
namespace Shivas\VersioningBundle\Writer;
|
|
|
|
use Version\Version;
|
|
|
|
/**
|
|
* Class VersionWriter
|
|
*/
|
|
class VersionWriter implements WriterInterface
|
|
{
|
|
/**
|
|
* @var string
|
|
*/
|
|
private $path;
|
|
|
|
/**
|
|
* Constructor
|
|
*
|
|
* @param string $path
|
|
*/
|
|
public function __construct($path)
|
|
{
|
|
$this->path = $path;
|
|
}
|
|
|
|
/**
|
|
* @param Version $version
|
|
*/
|
|
public function write(Version $version)
|
|
{
|
|
file_put_contents($this->path . DIRECTORY_SEPARATOR . 'VERSION', $version);
|
|
}
|
|
}
|