X-Git-Url: http://www.aleph1.co.uk/gitweb/?p=yaffs-website;a=blobdiff_plain;f=vendor%2Fjcalderonzumba%2Fmink-phantomjs-driver%2Fsrc%2FSessionTrait.php;fp=vendor%2Fjcalderonzumba%2Fmink-phantomjs-driver%2Fsrc%2FSessionTrait.php;h=6443dffac7eeb7adb4f5f60bf7b41a60570d3eb5;hp=0000000000000000000000000000000000000000;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad diff --git a/vendor/jcalderonzumba/mink-phantomjs-driver/src/SessionTrait.php b/vendor/jcalderonzumba/mink-phantomjs-driver/src/SessionTrait.php new file mode 100644 index 000000000..6443dffac --- /dev/null +++ b/vendor/jcalderonzumba/mink-phantomjs-driver/src/SessionTrait.php @@ -0,0 +1,50 @@ +started = true; + } + + /** + * Tells if the session is started or not + * @return bool + */ + public function isStarted() { + return $this->started; + } + + /** + * Stops the session completely, clean slate for the browser + * @return bool + */ + public function stop() { + //Since we are using a remote browser "API", stopping is just like resetting, say good bye to cookies + //TODO: In the future we may want to control a start / stop of the remove browser + return $this->reset(); + } + + /** + * Clears the cookies in the browser, all of them + * @return bool + */ + public function reset() { + $this->getBrowser()->clearCookies(); + $this->getBrowser()->reset(); + $this->started = false; + return true; + } +}