public function setHost($host)
    {
        if ($host instanceof $this->hostClass || $host instanceof \yii\web\IdentityInterface) {
            return $this->{$this->createdByAttribute} = $host->getGUID();
        }
        if (is_string($host) && preg_match(Number::GUID_REGEX, $host)) {
            return $this->{$this->createdByAttribute} = Number::guid_bin($host);
        }
        if (strlen($host) == 16) {
            return $this->{$this->createdByAttribute} = $host;
        }
        return false;
    }
public function setHost($host)
    {
        if ($host instanceof $this->hostClass || $host instanceof \yii\web\IdentityInterface) {
            return $this->{$this->createdByAttribute} = $host->getGUID();
        }
        if (is_string($host) && preg_match(Number::GUID_REGEX, $host)) {
            return $this->{$this->createdByAttribute} = Number::guid_bin($host);
        }
        if (strlen($host) == 16) {
            return $this->{$this->createdByAttribute} = $host;
        }
        return false;
    }
public function setHost ( $ host ) { if ( $ host instanceof $ this -> hostClass || $ host instanceof \ yii \ web \ IdentityInterface ) { return $ this -> { $ this -> createdByAttribute } = $ host -> getGUID ( ) ; } if ( is_string ( $ host ) && preg_match ( Number :: GUID_REGEX , $ host ) ) { return $ this -> { $ this -> createdByAttribute } = Number :: guid_bin ( $ host ) ; } if ( strlen ( $ host ) == 16 ) { return $ this -> { $ this -> createdByAttribute } = $ host ; } return false ; }
Set host of this model.
@param string $host
@return string|boolean
Set host of this model .