view 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
line wrap: on
line source
<?php

namespace Zumba\GastonJS\Browser;

/**
 * Trait BrowserPageTrait
 * @package Zumba\GastonJS\Browser
 */
trait BrowserPageTrait {
  /**
   * Gets the status code of the request we are currently in
   * @return mixed
   */
  public function getStatusCode() {
    return $this->command('status_code');
  }

  /**
   * Returns the body of the response to a given browser request
   * @return mixed
   */
  public function getBody() {
    return $this->command('body');
  }

  /**
   * Returns the source of the current page
   * @return mixed
   */
  public function getSource() {
    return $this->command('source');
  }

  /**
   * Gets the current page title
   * @return mixed
   */
  public function getTitle() {
    return $this->command('title');
  }

  /**
   * Resize the current page
   * @param $width
   * @param $height
   * @return mixed
   */
  public function resize($width, $height) {
    return $this->command('resize', $width, $height);
  }

  /**
   * Resets the page we are in to a clean slate
   * @return mixed
   */
  public function reset() {
    return $this->command('reset');
  }
}