Added a View::capture() method for view scripts