. * * This file is a part of iCalcreator. */ namespace Kigkonsult\Icalcreator\Traits; use Kigkonsult\Icalcreator\Util\Util; use function sprintf; /** * METHOD property functions * * @author Kjell-Inge Gustafsson, kigkonsult * @since 2.22.23 - 2017-02-02 */ trait METHODtrait { /** * @var string calendar property METHOD * @access protected */ protected $method = null; /** * Return formatted output for calendar property method * * @return string */ public function createMethod() { return ( empty( $this->method )) ? null : sprintf( self::$FMTICAL, Util::$METHOD, $this->method ); } /** * Set calendar property method * * @param string $value * @return bool */ public function setMethod( $value ) { if( empty( $value )) { return false; } $this->method = $value; return true; } }