Example #1
0
 /**
  * A simple way to add a recod set to the datagrid
  *
  * @access  public
  * @param   mixed   $rs         The record set in any of the supported data
  *                              source types
  * @param   array   $options    Optional. The options to be used for the
  *                              data source
  * @param   string  $type       Optional. The data source type
  * @return  bool                True if successful, otherwise PEAR_Error.
  */
 function bind($rs, $options = array(), $type = null)
 {
     require_once 'Structures/DataGrid/DataSource.php';
     $source =& Structures_DataGrid_DataSource::create($rs, $options, $type);
     if (!PEAR::isError($source)) {
         return $this->bindDataSource($source);
     } else {
         return $source;
     }
 }