Patched to Drupal 8.4.8 level. See https://www.drupal.org/sa-core-2018-004 and patch...
[yaffs-website] / vendor / jcalderonzumba / gastonjs / src / Browser / BrowserPageTrait.php
1 <?php
2
3 namespace Zumba\GastonJS\Browser;
4
5 /**
6  * Trait BrowserPageTrait
7  * @package Zumba\GastonJS\Browser
8  */
9 trait BrowserPageTrait {
10   /**
11    * Gets the status code of the request we are currently in
12    * @return mixed
13    */
14   public function getStatusCode() {
15     return $this->command('status_code');
16   }
17
18   /**
19    * Returns the body of the response to a given browser request
20    * @return mixed
21    */
22   public function getBody() {
23     return $this->command('body');
24   }
25
26   /**
27    * Returns the source of the current page
28    * @return mixed
29    */
30   public function getSource() {
31     return $this->command('source');
32   }
33
34   /**
35    * Gets the current page title
36    * @return mixed
37    */
38   public function getTitle() {
39     return $this->command('title');
40   }
41
42   /**
43    * Resize the current page
44    * @param $width
45    * @param $height
46    * @return mixed
47    */
48   public function resize($width, $height) {
49     return $this->command('resize', $width, $height);
50   }
51
52   /**
53    * Resets the page we are in to a clean slate
54    * @return mixed
55    */
56   public function reset() {
57     return $this->command('reset');
58   }
59 }