Skip to content

Commit 9fec9ed

Browse files
authored
Merge pull request #8 from lukecurtis93/master
Set Language Addition whenHears
2 parents 3397b4a + e4c88bc commit 9fec9ed

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/PublicStream.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public function __construct(
2424
/**
2525
* @param string|array $listenFor
2626
* @param callable $whenHears
27+
* @param string $lang
2728
*
2829
* @return $this
2930
*/
@@ -58,4 +59,17 @@ public function whenTweets($twitterUserIds, callable $whenTweets)
5859

5960
return $this;
6061
}
62+
63+
/**
64+
* @param string $lang
65+
* Restricts tweets to the given language, given by an ISO 639-1 code (http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes).
66+
*
67+
* @return $this
68+
*/
69+
public function setLocale($lang)
70+
{
71+
$this->stream->setLang($lang);
72+
73+
return $this;
74+
}
6175
}

0 commit comments

Comments
 (0)