src/Types/Props.php
public function assignExisting ( $propName, $propValue ) {
        if (is_bool( $this->$propName )) {
            if (strtolower( $propValue ) == 'false') {
                $propValue = false;
            }
            $this->$propName = (bool) $propValue;
        } elseif (is_int( $this->$propName )) {
            $this->$propName = (int) $propValue;
        } elseif (is_bool( $this->$propName )) {
            $this->$propName = (bool) $propValue;
        } elseif ($this->$propName instanceof Timer || $this->$propName == MapConst::TIMER) {
            $this->$propName = new Timer( $propValue );
        } else {
            $this->$propName = $propValue;
        }
    }
public function assignExisting ( $propName, $propValue ) {
        if (is_bool( $this->$propName )) {
            if (strtolower( $propValue ) == 'false') {
                $propValue = false;
            }
            $this->$propName = (bool) $propValue;
        } elseif (is_int( $this->$propName )) {
            $this->$propName = (int) $propValue;
        } elseif (is_bool( $this->$propName )) {
            $this->$propName = (bool) $propValue;
        } elseif ($this->$propName instanceof Timer || $this->$propName == MapConst::TIMER) {
            $this->$propName = new Timer( $propValue );
        } else {
            $this->$propName = $propValue;
        }
    }
public function assignExisting ( $ propName , $ propValue ) { if ( is_bool ( $ this -> $ propName ) ) { if ( strtolower ( $ propValue ) == 'false' ) { $ propValue = false ; } $ this -> $ propName = ( bool ) $ propValue ; } elseif ( is_int ( $ this -> $ propName ) ) { $ this -> $ propName = ( int ) $ propValue ; } elseif ( is_bool ( $ this -> $ propName ) ) { $ this -> $ propName = ( bool ) $ propValue ; } elseif ( $ this -> $ propName instanceof Timer || $ this -> $ propName == MapConst :: TIMER ) { $ this -> $ propName = new Timer ( $ propValue ) ; } else { $ this -> $ propName = $ propValue ; } }
assign value to a existing propertie and
cast depending on defined default value
@param string $propName
@param boolean $propValue
assign value to a existing propertie and cast depending on defined default value