src/SkeVent.php
public function setProperty(string $strKey, $mValue)
    {
        // Empty strings coming from an HTML form should be nullified
        if ('' === $mValue)
            $mValue = null;

        switch ($strKey) {

            // Parse weekday values
            case 'weekdays':
            $this->setWeekdays((array)$mValue);
                break;

            // Process tags
            case 'tags':
                $this->setTags($mValue);
                break;

            // Save datetimes & timezone for later
            case 'timezone':
                $this->strTimezone = $mValue;
                break;
            case 'starts_at':
            case 'ends_at':
                $strProperty = 'starts_at' === $strKey ? 'strStartsAt' : 'strEndsAt';
                $this->$strProperty = $mValue;
                // no break, so it falls through to default

            default:
                $this->aProperties[$strKey] = $mValue;
                break;
        }
    }
public function setProperty(string $strKey, $mValue)
    {
        // Empty strings coming from an HTML form should be nullified
        if ('' === $mValue)
            $mValue = null;

        switch ($strKey) {

            // Parse weekday values
            case 'weekdays':
            $this->setWeekdays((array)$mValue);
                break;

            // Process tags
            case 'tags':
                $this->setTags($mValue);
                break;

            // Save datetimes & timezone for later
            case 'timezone':
                $this->strTimezone = $mValue;
                break;
            case 'starts_at':
            case 'ends_at':
                $strProperty = 'starts_at' === $strKey ? 'strStartsAt' : 'strEndsAt';
                $this->$strProperty = $mValue;
                // no break, so it falls through to default

            default:
                $this->aProperties[$strKey] = $mValue;
                break;
        }
    }
public function setProperty ( string $ strKey , $ mValue ) { // Empty strings coming from an HTML form should be nullified if ( '' === $ mValue ) $ mValue = null ; switch ( $ strKey ) { // Parse weekday values case 'weekdays' : $ this -> setWeekdays ( ( array ) $ mValue ) ; break ; // Process tags case 'tags' : $ this -> setTags ( $ mValue ) ; break ; // Save datetimes & timezone for later case 'timezone' : $ this -> strTimezone = $ mValue ; break ; case 'starts_at' : case 'ends_at' : $ strProperty = 'starts_at' === $ strKey ? 'strStartsAt' : 'strEndsAt' ; $ this -> $ strProperty = $ mValue ; // no break, so it falls through to default default : $ this -> aProperties [ $ strKey ] = $ mValue ; break ; } }
Set an event property by key.

@param string $strKey The name of the property to set.
@param mixed $mValue New value for the property.
Set an event property by key .