original_string: public function describe($name, array $options = [])
      {
          $config = $this->_connection->config();
          if (strpos($name, '.')) {
              list($config['schema'], $name) = explode('.', $name);
          }
          $table = new TableSchema($name);
  
          $this->_reflect('Column', $name, $config, $table);
          if (count($table->columns()) === 0) {
              throw new Exception(sprintf('Cannot describe %s. It has 0 columns.', $name));
          }
  
          $this->_reflect('Index', $name, $config, $table);
          $this->_reflect('ForeignKey', $name, $config, $table);
          $this->_reflect('Options', $name, $config, $table);
  
          return $table;
      }
code: public function describe($name, array $options = [])
      {
          $config = $this->_connection->config();
          if (strpos($name, '.')) {
              list($config['schema'], $name) = explode('.', $name);
          }
          $table = new TableSchema($name);
  
          $this->_reflect('Column', $name, $config, $table);
          if (count($table->columns()) === 0) {
              throw new Exception(sprintf('Cannot describe %s. It has 0 columns.', $name));
          }
  
          $this->_reflect('Index', $name, $config, $table);
          $this->_reflect('ForeignKey', $name, $config, $table);
          $this->_reflect('Options', $name, $config, $table);
  
          return $table;
      }
code_tokens: public function describe ( $ name , array $ options = [ ] ) { $ config = $ this -> _connection -> config ( ) ; if ( strpos ( $ name , '.' ) ) { list ( $ config [ 'schema' ] , $ name ) = explode ( '.' , $ name ) ; } $ table = new TableSchema ( $ name ) ; $ this -> _reflect ( 'Column' , $ name , $ config , $ table ) ; if ( count ( $ table -> columns ( ) ) === 0 ) { throw new Exception ( sprintf ( 'Cannot describe %s. It has 0 columns.' , $ name ) ) ; } $ this -> _reflect ( 'Index' , $ name , $ config , $ table ) ; $ this -> _reflect ( 'ForeignKey' , $ name , $ config , $ table ) ; $ this -> _reflect ( 'Options' , $ name , $ config , $ table ) ; return $ table ; }
docstring: Get the column metadata for a table.
  
  Caching will be applied if `cacheMetadata` key is present in the Connection
  configuration options. Defaults to _cake_model_ when true.
  
  ### Options
  
  - `forceRefresh` - Set to true to force rebuilding the cached metadata.
  Defaults to false.
  
  @param string $name The name of the table to describe.
  @param array $options The options to use, see above.
  @return \Cake\Database\Schema\TableSchema Object with column metadata.
  @throws \Cake\Database\Exception when table cannot be described.
docstring_tokens: Get the column metadata for a table .