original_string: protected function key($data = null)
      {
          if (is_null($data)) {
              $data = $this->getPK();
              //
              if (Table::count($data) > 1) {
                  throw new ManyPrimaryKeysException();
              } elseif (Table::count($data) == 0) {
                  throw new PrimaryKeyNotFoundException(static::$table);
              }
              //
              $this->_keyName = $data[0]['Column_name'];
              $this->_key['name'] = $data[0]['Column_name'];
          } else {
              $this->_keyName = $data['key'];
              $this->_key['name'] = $data['key'];
          }
      }
code: protected function key($data = null)
      {
          if (is_null($data)) {
              $data = $this->getPK();
              //
              if (Table::count($data) > 1) {
                  throw new ManyPrimaryKeysException();
              } elseif (Table::count($data) == 0) {
                  throw new PrimaryKeyNotFoundException(static::$table);
              }
              //
              $this->_keyName = $data[0]['Column_name'];
              $this->_key['name'] = $data[0]['Column_name'];
          } else {
              $this->_keyName = $data['key'];
              $this->_key['name'] = $data['key'];
          }
      }
code_tokens: protected function key ( $ data = null ) { if ( is_null ( $ data ) ) { $ data = $ this -> getPK ( ) ; // if ( Table :: count ( $ data ) > 1 ) { throw new ManyPrimaryKeysException ( ) ; } elseif ( Table :: count ( $ data ) == 0 ) { throw new PrimaryKeyNotFoundException ( static :: $ table ) ; } // $ this -> _keyName = $ data [ 0 ] [ 'Column_name' ] ; $ this -> _key [ 'name' ] = $ data [ 0 ] [ 'Column_name' ] ; } else { $ this -> _keyName = $ data [ 'key' ] ; $ this -> _key [ 'name' ] = $ data [ 'key' ] ; } }
docstring: set primary key
  the framework doesn't support more the column to be
  the primary key otherwise exception will be thrown.
  
  @return null
docstring_tokens: set primary key the framework doesn t support more the column to be the primary key otherwise exception will be thrown .