Sets the Site Id attribute value.
@param int $nb_site_id New value for attribute
@return CNabuDataObject Returns self instance to grant chained setters call.
177295
public function setSiteId(int $nb_site_id) : CNabuDataObject
    {
        if ($nb_site_id === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$nb_site_id")
            );
        }
        $this->setValue('nb_site_id', $nb_site_id);
        
        return $this;
    }
217365
public function setTtl(int $ttl = 86400) : CNabuDataObject
    {
        if ($ttl === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$ttl")
            );
        }
        $this->setValue('nb_domain_zone_ttl', $ttl);
        
        return $this;
    }
373509
public function setMountingOrder(int $mounting_order = 0) : CNabuDataObject
    {
        if ($mounting_order === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$mounting_order")
            );
        }
        $this->setValue('nb_site_mounting_order', $mounting_order);
        
        return $this;
    }
658912
public function setPort(int $port = 80) : CNabuDataObject
    {
        if ($port === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$port")
            );
        }
        $this->setValue('nb_server_host_port', $port);
        
        return $this;
    }
474280
public function setSite($site = null)
    {
        $this->site = null;

        if (($site = SiteHelper::resolve($site)) === null) {
            $this->site = $this->siteId = null;
        } else {
            $this->siteId = $site->id;
            $this->site = $site;
        }

        return $this;
    }
365156
public function setCommerce(CNabuCommerce $nb_commerce)
    {
        $this->nb_commerce = $nb_commerce;
        $this->transferValue($nb_commerce, NABU_COMMERCE_FIELD_ID);

        return $this;
    }
517360
static public function getRolesForSite($nb_site) : CNabuRoleList
    {
        $nb_site_id = nb_getMixedValue($nb_site, NABU_SITE_FIELD_ID);

        if (is_numeric($nb_site_id)) {
            $retval = self::buildObjectListFromSQL(
                'nb_role_id',
                'select r.* '
                . 'from nb_role r, nb_site_role sr, nb_site s '
               . 'where r.nb_role_id=sr.nb_role_id '
                 . 'and sr.nb_site_id=s.nb_site_id '
                 . 'and s.nb_site_id=%site_id$d',
                array(
                    'site_id' => $nb_site_id
                ),
                ($nb_site instanceof CNabuSite ? $nb_site : null)
            );
        } else {
            $retval = new CNabuRoleList();
        }

        return $retval;
    }
482509
public function setSignInLockDelay(int $signin_lock_delay = 0) : CNabuDataObject
    {
        if ($signin_lock_delay === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$signin_lock_delay")
            );
        }
        $this->setValue('nb_site_signin_lock_delay', $signin_lock_delay);
        
        return $this;
    }
634484
public function setUseAWStats(string $use_awstats = "F") : CNabuDataObject
    {
        if ($use_awstats === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$use_awstats")
            );
        }
        $this->setValue('nb_site_use_awstats', $use_awstats);
        
        return $this;
    }
1033077
public function setUseHTTPS(string $use_https = "F") : CNabuDataObject
    {
        if ($use_https === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$use_https")
            );
        }
        $this->setValue('nb_site_target_use_https', $use_https);
        
        return $this;
    }
19152
public function setCreationDatetime($creation_datetime) : CNabuDataObject
    {
        if ($creation_datetime === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$creation_datetime")
            );
        }
        $this->setValue('nb_user_creation_datetime', $creation_datetime);
        
        return $this;
    }
334578
public function setTypeId(int $type_id) : CNabuDataObject
    {
        if ($type_id === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$type_id")
            );
        }
        $this->setValue('nb_user_group_type_id', $type_id);
        
        return $this;
    }
656112
public function setOrigin($origin) : CNabuDataObject
    {
        if ($origin === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$origin")
            );
        }
        $this->setValue('nb_domain_zone_origin', $origin);
        
        return $this;
    }
1118009
public function setCatalogTagId(int $nb_catalog_tag_id) : CNabuDataObject
    {
        if ($nb_catalog_tag_id === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$nb_catalog_tag_id")
            );
        }
        $this->setValue('nb_catalog_tag_id', $nb_catalog_tag_id);
        
        return $this;
    }
1158979
public static function findByKey($nb_site, $key)
    {
        $nb_site_id = nb_getMixedValue($nb_site, 'nb_site_id');
        if (is_numeric($nb_site_id)) {
            $retval = CNabuSiteTarget::buildObjectFromSQL(
                    'select * '
                    . 'from nb_site_target '
                   . 'where nb_site_id=%site_id$d '
                     . "and nb_site_target_key='%key\$s'",
                    array(
                        'site_id' => $nb_site_id,
                        'key' => $key
                    )
            );
        } else {
            $retval = null;
        }
        
        return $retval;
    }
97112
public function setMediotecaTypeId(int $nb_medioteca_type_id) : CNabuDataObject
    {
        if ($nb_medioteca_type_id === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$nb_medioteca_type_id")
            );
        }
        $this->setValue('nb_medioteca_type_id', $nb_medioteca_type_id);
        
        return $this;
    }
1192560
public function setUseHTTP(string $use_http = "F") : CNabuDataObject
    {
        if ($use_http === null) {
            throw new ENabuCoreException(
                    ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN,
                    array("\$use_http")
            );
        }
        $this->setValue('nb_site_target_use_http', $use_http);
        
        return $this;
    }