Created
August 27, 2014 15:06
-
-
Save alnutile/a353c80a40ec1aec9e14 to your computer and use it in GitHub Desktop.
browsers
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /** | |
| * Created by PhpStorm. | |
| * User: alfrednutile | |
| * Date: 8/27/14 | |
| * Time: 11:04 AM | |
| */ | |
| namespace BehatEditor; | |
| use BehatEditor\Models\Browser; | |
| trait BrowsersTrait { | |
| protected $browsers; | |
| public function getBrowsers() | |
| { | |
| if($this->browsers == null) | |
| { | |
| $this->setBrowsers(); | |
| } | |
| return $this->browsers; | |
| } | |
| public function setBrowsers(array $browsers = array()) | |
| { | |
| if($browsers == null) | |
| { | |
| $browsers = new Browser(); | |
| return $browsers->all()->toArray(); | |
| } | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment