Mercurial > hg > isophonics-drupal-site
annotate vendor/jcalderonzumba/gastonjs/src/Browser/BrowserPageTrait.php @ 19:fa3358dc1485 tip
Add ndrum files
author | Chris Cannam |
---|---|
date | Wed, 28 Aug 2019 13:14:47 +0100 |
parents | 4c8ae668cc8c |
children |
rev | line source |
---|---|
Chris@0 | 1 <?php |
Chris@0 | 2 |
Chris@0 | 3 namespace Zumba\GastonJS\Browser; |
Chris@0 | 4 |
Chris@0 | 5 /** |
Chris@0 | 6 * Trait BrowserPageTrait |
Chris@0 | 7 * @package Zumba\GastonJS\Browser |
Chris@0 | 8 */ |
Chris@0 | 9 trait BrowserPageTrait { |
Chris@0 | 10 /** |
Chris@0 | 11 * Gets the status code of the request we are currently in |
Chris@0 | 12 * @return mixed |
Chris@0 | 13 */ |
Chris@0 | 14 public function getStatusCode() { |
Chris@0 | 15 return $this->command('status_code'); |
Chris@0 | 16 } |
Chris@0 | 17 |
Chris@0 | 18 /** |
Chris@0 | 19 * Returns the body of the response to a given browser request |
Chris@0 | 20 * @return mixed |
Chris@0 | 21 */ |
Chris@0 | 22 public function getBody() { |
Chris@0 | 23 return $this->command('body'); |
Chris@0 | 24 } |
Chris@0 | 25 |
Chris@0 | 26 /** |
Chris@0 | 27 * Returns the source of the current page |
Chris@0 | 28 * @return mixed |
Chris@0 | 29 */ |
Chris@0 | 30 public function getSource() { |
Chris@0 | 31 return $this->command('source'); |
Chris@0 | 32 } |
Chris@0 | 33 |
Chris@0 | 34 /** |
Chris@0 | 35 * Gets the current page title |
Chris@0 | 36 * @return mixed |
Chris@0 | 37 */ |
Chris@0 | 38 public function getTitle() { |
Chris@0 | 39 return $this->command('title'); |
Chris@0 | 40 } |
Chris@0 | 41 |
Chris@0 | 42 /** |
Chris@0 | 43 * Resize the current page |
Chris@0 | 44 * @param $width |
Chris@0 | 45 * @param $height |
Chris@0 | 46 * @return mixed |
Chris@0 | 47 */ |
Chris@0 | 48 public function resize($width, $height) { |
Chris@0 | 49 return $this->command('resize', $width, $height); |
Chris@0 | 50 } |
Chris@0 | 51 |
Chris@0 | 52 /** |
Chris@0 | 53 * Resets the page we are in to a clean slate |
Chris@0 | 54 * @return mixed |
Chris@0 | 55 */ |
Chris@0 | 56 public function reset() { |
Chris@0 | 57 return $this->command('reset'); |
Chris@0 | 58 } |
Chris@0 | 59 } |