. * * This file is a part of iCalcreator. */ namespace Kigkonsult\Icalcreator\Traits; use Kigkonsult\Icalcreator\Util\Util; /** * VERSION property functions * * @author Kjell-Inge Gustafsson, kigkonsult * @since 2.22.23 - 2017-02-18 */ trait VERSIONtrait { /** * Property Name: VERSION * * Description: A value of "2.0" corresponds to this memo. * * @var string calendar property VERSION * @access protected */ protected $version = '2.0'; /** * Return formatted output for calendar property version * * If version is missing, version is set * * @return string */ public function createVersion() { return sprintf( self::$FMTICAL, Util::$VERSION, $this->version ); } /** * Set (another?) calendar version * * @param string $value * @return bool */ public function setVersion( $value ) { if( empty( $value )) { return false; } $this->version = $value; return true; } }