public function setUid(string $source_tag, int $max_uid_length = 255, bool $connect_onload = false, bool $connect_onchange = false)
    {
        if (!$source_tag) {
            $this->uid = false;

            return $this;
        }

        $this->uid = [];
        $this->uid['source'] = $source_tag;

        if (!$max_uid_length) {
            $this->uid['generate'] = false; // No uid function
        } else {
            $this->uid['generate'] = true;
            $this->uid['max_uid_length'] = $max_uid_length;
            $this->uid['connect_onload'] = $connect_onload;
            $this->uid['connect_onchange'] = $connect_onchange;
        }

        return $this;
    }
public function setUid(string $source_tag, int $max_uid_length = 255, bool $connect_onload = false, bool $connect_onchange = false)
    {
        if (!$source_tag) {
            $this->uid = false;

            return $this;
        }

        $this->uid = [];
        $this->uid['source'] = $source_tag;

        if (!$max_uid_length) {
            $this->uid['generate'] = false; // No uid function
        } else {
            $this->uid['generate'] = true;
            $this->uid['max_uid_length'] = $max_uid_length;
            $this->uid['connect_onload'] = $connect_onload;
            $this->uid['connect_onchange'] = $connect_onchange;
        }

        return $this;
    }
public function setUid ( string $ source_tag , int $ max_uid_length = 255 , bool $ connect_onload = false , bool $ connect_onchange = false ) { if ( ! $ source_tag ) { $ this -> uid = false ; return $ this ; } $ this -> uid = [ ] ; $ this -> uid [ 'source' ] = $ source_tag ; if ( ! $ max_uid_length ) { $ this -> uid [ 'generate' ] = false ; // No uid function } else { $ this -> uid [ 'generate' ] = true ; $ this -> uid [ 'max_uid_length' ] = $ max_uid_length ; $ this -> uid [ 'connect_onload' ] = $ connect_onload ; $ this -> uid [ 'connect_onchange' ] = $ connect_onchange ; } return $ this ; }
Enables UID function to change non-latin chars to latin

@param bool|string $source_tag     if false, disables uid
@param int         $max_uid_length if string - contanes function for uid
@param bool        $connect_onload
@param bool        $connect_onchange

@return $this
Enables UID function to change non - latin chars to latin