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);
        }
    }
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);
        }
    }
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 ) ; } }
get data from data table according to primary key value.

@param int $key

@return null
get data from data table according to primary key value .