Example #1
0
 /**
  * A simple way to add a record set to the datagrid
  *
  * @example bind-dataobject.php Bind a DB_DataObject
  * @example bind-sql.php        Bind an SQL query
  * @access  public
  * @param   mixed   $container  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($container, $options = array(), $type = null)
 {
     $source =& Structures_DataGrid::dataSourceFactory($container, $options, $type);
     if (!PEAR::isError($source)) {
         return $this->bindDataSource($source);
     } else {
         return $source;
     }
 }