public function add_data_source( \Serializable $source, $name = '' ) {

		if ( $name ) {
			$this->data_sources[ $name ] = $source;
		} else {
			$this->data_sources[] = $source;
		}

		$this->regenerate();

		return $this;
	}
public function add_data_source( \Serializable $source, $name = '' ) {

		if ( $name ) {
			$this->data_sources[ $name ] = $source;
		} else {
			$this->data_sources[] = $source;
		}

		$this->regenerate();

		return $this;
	}
public function add_data_source ( \ Serializable $ source , $ name = '' ) { if ( $ name ) { $ this -> data_sources [ $ name ] = $ source ; } else { $ this -> data_sources [ ] = $ source ; } $ this -> regenerate ( ) ; return $ this ; }
Add a data source.

@since 1.0

@param \Serializable $source
@param string        $name If passed, listeners specifying that function
argument name will receive this data source.

@return self
Add a data source .