Prado\Collections\TPagedDataSource::setDataSource PHP Method

setDataSource() public method

public setDataSource ( $value )
    public function setDataSource($value)
    {
        if (!$value instanceof TMap && !$value instanceof TList) {
            if (is_array($value)) {
                $value = new TMap($value);
            } else {
                if ($value instanceof \Traversable) {
                    $value = new TList($value);
                } else {
                    if ($value !== null) {
                        throw new TInvalidDataTypeException('pageddatasource_datasource_invalid');
                    }
                }
            }
        }
        $this->_dataSource = $value;
    }