original_string: protected function struct($key, $fail)
      {
          $data = $this->dig($key);
          //
          if (Table::count($data) == 1) {
              if ($this->_canKept && $this->keptAt($data)) {
                  $this->_kept = true;
              }
              if ($this->_canStashed && $this->stashedAt($data)) {
                  $this->_stashed = true;
              }
              //
              $this->convert($data);
          } elseif ($fail && Table::count($data) == 0) {
              throw new ModelNotFoundException($key, $this->_model);
          }
      }
code: protected function struct($key, $fail)
      {
          $data = $this->dig($key);
          //
          if (Table::count($data) == 1) {
              if ($this->_canKept && $this->keptAt($data)) {
                  $this->_kept = true;
              }
              if ($this->_canStashed && $this->stashedAt($data)) {
                  $this->_stashed = true;
              }
              //
              $this->convert($data);
          } elseif ($fail && Table::count($data) == 0) {
              throw new ModelNotFoundException($key, $this->_model);
          }
      }
code_tokens: protected function struct ( $ key , $ fail ) { $ data = $ this -> dig ( $ key ) ; // if ( Table :: count ( $ data ) == 1 ) { if ( $ this -> _canKept && $ this -> keptAt ( $ data ) ) { $ this -> _kept = true ; } if ( $ this -> _canStashed && $ this -> stashedAt ( $ data ) ) { $ this -> _stashed = true ; } // $ this -> convert ( $ data ) ; } elseif ( $ fail && Table :: count ( $ data ) == 0 ) { throw new ModelNotFoundException ( $ key , $ this -> _model ) ; } }
docstring: get data from data table according to primary key value.
  
  @param int $key
  
  @return null
docstring_tokens: get data from data table according to primary key value .