public function use_view($view)
	{
		$views = call_user_func(array($this->model, 'views'));
		if ( ! array_key_exists($view, $views))
		{
			throw new \OutOfBoundsException('Cannot use undefined database view, must be defined with Model.');
		}

		$this->view = $views[$view];
		$this->view['_name'] = $view;
		return $this;
	}
public function use_view($view)
	{
		$views = call_user_func(array($this->model, 'views'));
		if ( ! array_key_exists($view, $views))
		{
			throw new \OutOfBoundsException('Cannot use undefined database view, must be defined with Model.');
		}

		$this->view = $views[$view];
		$this->view['_name'] = $view;
		return $this;
	}
public function use_view ( $ view ) { $ views = call_user_func ( array ( $ this -> model , 'views' ) ) ; if ( ! array_key_exists ( $ view , $ views ) ) { throw new \ OutOfBoundsException ( 'Cannot use undefined database view, must be defined with Model.' ) ; } $ this -> view = $ views [ $ view ] ; $ this -> view [ '_name' ] = $ view ; return $ this ; }
Set a view to use instead of the table

@param  string   $view   Name of view which you want to use

@throws \OutOfBoundsException Cannot use undefined database view, must be defined with Model

@return  Query
Set a view to use instead of the table