public function get_by_bit(string $id): ?array
  {
    $t =& $this;
    if ( \bbn\str::is_uid($id) ){
      return $this->db->rselect([
        'table' => $this->class_cfg['table'],
        'fields' => array_map(function($v) use($t){
          return $this->class_cfg['table'].'.'.$v;
        }, array_values($this->class_cfg['arch']['user_options'])),
        'join' => [[
          'table' => $this->class_cfg['tables']['user_options_bits'],
          'on' => [
            'conditions' => [[
              'field' => $this->class_cfg['arch']['user_options_bits']['id_user_option'],
              'exp' => $this->class_cfg['table'].'.'.$this->fields['id']
            ]]
          ]
        ]],
        'where' => [
          $this->class_cfg['tables']['user_options_bits'].'.'.$this->class_cfg['arch']['user_options_bits']['id'] => $id
        ]
      ]);
    }
  }
public function get_by_bit(string $id): ?array
  {
    $t =& $this;
    if ( \bbn\str::is_uid($id) ){
      return $this->db->rselect([
        'table' => $this->class_cfg['table'],
        'fields' => array_map(function($v) use($t){
          return $this->class_cfg['table'].'.'.$v;
        }, array_values($this->class_cfg['arch']['user_options'])),
        'join' => [[
          'table' => $this->class_cfg['tables']['user_options_bits'],
          'on' => [
            'conditions' => [[
              'field' => $this->class_cfg['arch']['user_options_bits']['id_user_option'],
              'exp' => $this->class_cfg['table'].'.'.$this->fields['id']
            ]]
          ]
        ]],
        'where' => [
          $this->class_cfg['tables']['user_options_bits'].'.'.$this->class_cfg['arch']['user_options_bits']['id'] => $id
        ]
      ]);
    }
  }
public function get_by_bit ( string $ id ) : ? array { $ t = & $ this ; if ( \ bbn \ str :: is_uid ( $ id ) ) { return $ this -> db -> rselect ( [ 'table' => $ this -> class_cfg [ 'table' ] , 'fields' => array_map ( function ( $ v ) use ( $ t ) { return $ this -> class_cfg [ 'table' ] . '.' . $ v ; } , array_values ( $ this -> class_cfg [ 'arch' ] [ 'user_options' ] ) ) , 'join' => [ [ 'table' => $ this -> class_cfg [ 'tables' ] [ 'user_options_bits' ] , 'on' => [ 'conditions' => [ [ 'field' => $ this -> class_cfg [ 'arch' ] [ 'user_options_bits' ] [ 'id_user_option' ] , 'exp' => $ this -> class_cfg [ 'table' ] . '.' . $ this -> fields [ 'id' ] ] ] ] ] ] , 'where' => [ $ this -> class_cfg [ 'tables' ] [ 'user_options_bits' ] . '.' . $ this -> class_cfg [ 'arch' ] [ 'user_options_bits' ] [ 'id' ] => $ id ] ] ) ; } }
Gets a preference row from a bit ID

@param string $id The bit's ID
@return array
Gets a preference row from a bit ID