code
stringlengths
17
247k
docstring
stringlengths
30
30.3k
func_name
stringlengths
1
89
language
stringclasses
1 value
repo
stringlengths
7
63
path
stringlengths
7
153
url
stringlengths
51
209
license
stringclasses
4 values
public function assertOutputContainsString(string $uri, string $string) { $_SERVER['REQUEST_URI'] = '/' . trim($uri, '/'); ob_start(); $this->route(); $output = ob_get_contents(); ob_end_clean(); $this->assertStringContainsString($string, $output); }
Check whether the page contains a string. @param string $uri The page's URI path. @param string $string Usually the page title. @return void
assertOutputContainsString
php
terrylinooo/shieldon
tests/Firewall/Panel/RouteTestTrait.php
https://github.com/terrylinooo/shieldon/blob/master/tests/Firewall/Panel/RouteTestTrait.php
MIT
public function assertOutputNotContainsString(string $uri, string $string) { $response = $this->getRouteResponse($uri); $stream = $response->getBody(); if (strpos($stream->getContents(), $string) === false) { $this->assertTrue(true); } else { $this->assertTrue(false); } }
Check whether the page "NOT" contains a string. @param string $uri The page's URI path. @param string $string Usually the page title. @return void
assertOutputNotContainsString
php
terrylinooo/shieldon
tests/Firewall/Panel/RouteTestTrait.php
https://github.com/terrylinooo/shieldon/blob/master/tests/Firewall/Panel/RouteTestTrait.php
MIT
public function __construct(Crawler $crawler) { $this->crawler = $crawler; }
SeasonListItemParser constructor. @param Crawler $crawler
__construct
php
jikan-me/jikan
src/Parser/SeasonList/SeasonListItemParser.php
https://github.com/jikan-me/jikan/blob/master/src/Parser/SeasonList/SeasonListItemParser.php
MIT
public function __construct(Crawler $crawler) { $this->crawler = $crawler; parent::__construct($this->crawler); }
VoiceActingRoleParser constructor. @param Crawler $crawler
__construct
php
jikan-me/jikan
src/Parser/Character/MangaographyParser.php
https://github.com/jikan-me/jikan/blob/master/src/Parser/Character/MangaographyParser.php
MIT
public function __construct(string $name, string $url, string $imageUrl, MalUrl $malUrl) { parent::__construct($name, $url, $imageUrl); $this->entry = new FavoriteCharacterRelatedEntry($malUrl); }
FavoriteCharacter constructor. @param string $name @param string $url @param string $imageUrl @param MalUrl $malUrl
__construct
php
jikan-me/jikan
src/Model/User/FavoriteCharacter.php
https://github.com/jikan-me/jikan/blob/master/src/Model/User/FavoriteCharacter.php
MIT
public function __construct(string $name, string $url, string $imageUrl, string $typeAndYear) { parent::__construct($name, $url, $imageUrl); $typeAndYearArr = explode("·", $typeAndYear); $this->type = trim($typeAndYearArr[0]); $this->startYear = (int) trim($typeAndYearArr[1]); }
FavoriteListEntry constructor. @param string $name @param string $url @param string $imageUrl @param string $typeAndYear
__construct
php
jikan-me/jikan
src/Model/User/FavoriteListEntry.php
https://github.com/jikan-me/jikan/blob/master/src/Model/User/FavoriteListEntry.php
MIT
public function __construct(int $page = 1) { $this->page = $page; }
RecentPromotionalVideosRequest constructor. @param int $page starts at 1
__construct
php
jikan-me/jikan
src/Request/Watch/RecentPromotionalVideosRequest.php
https://github.com/jikan-me/jikan/blob/master/src/Request/Watch/RecentPromotionalVideosRequest.php
MIT
public function __construct(int $id) { $this->id = $id; }
CharacterPicturesRequest constructor. @param int $id
__construct
php
jikan-me/jikan
src/Request/Character/CharacterPicturesRequest.php
https://github.com/jikan-me/jikan/blob/master/src/Request/Character/CharacterPicturesRequest.php
MIT
public function __construct(string $type = Constants::RECENT_RECOMMENDATION_ANIME, int $page = 1) { $this->page = $page; if (null !== $type) { if (!\in_array( $type, [ Constants::RECENT_RECOMMENDATION_ANIME, Constants::RECENT_RECOMMENDATION_MANGA ], true ) ) { throw new \InvalidArgumentException(sprintf('Recommendation type %s is not valid', $type)); } $this->type = $type; } }
RecentRecommendationsRequest constructor. @param int $page @param string $type @throws \InvalidArgumentException
__construct
php
jikan-me/jikan
src/Request/Recommendations/RecentRecommendationsRequest.php
https://github.com/jikan-me/jikan/blob/master/src/Request/Recommendations/RecentRecommendationsRequest.php
MIT
public function __construct(int $id, int $page = 1) { $this->id = $id; $this->page = $page; }
AnimeGenreRequest constructor. @param int $id @param int $page
__construct
php
jikan-me/jikan
src/Request/Genre/AnimeGenreRequest.php
https://github.com/jikan-me/jikan/blob/master/src/Request/Genre/AnimeGenreRequest.php
MIT
public function __construct(string $username, ?int $page = 1) { $this->username = $username; $this->page = $page; }
UserReviewsRequest constructor. @param string $username @param int|null $page
__construct
php
jikan-me/jikan
src/Request/User/UserRecommendationsRequest.php
https://github.com/jikan-me/jikan/blob/master/src/Request/User/UserRecommendationsRequest.php
MIT
public function __construct(string $username, int $page = 1, int $status = 7) { $this->username = $username; $this->page = ($page - 1) * 300; $this->status = $status; }
UserMangaListRequest constructor. @param string $username @param int $page @param int $status
__construct
php
jikan-me/jikan
src/Request/User/UserMangaListRequest.php
https://github.com/jikan-me/jikan/blob/master/src/Request/User/UserMangaListRequest.php
MIT
public function __construct(string $username, int $page = 1) { $this->username = $username; $this->page = $page; }
UserProfileRequest constructor. @param string $username @param int $page starts at 1
__construct
php
jikan-me/jikan
src/Request/User/UserFriendsRequest.php
https://github.com/jikan-me/jikan/blob/master/src/Request/User/UserFriendsRequest.php
MIT
public function __construct(string $username, int $page = 1, int $status = Constants::USER_ANIME_LIST_ALL) { $this->username = $username; $this->page = ($page - 1) * 300; $this->status = $status; }
UserAnimeListRequest constructor. @param string $username @param int $page @param int $status
__construct
php
jikan-me/jikan
src/Request/User/UserAnimeListRequest.php
https://github.com/jikan-me/jikan/blob/master/src/Request/User/UserAnimeListRequest.php
MIT
public function __construct(string $username, $type = null) { $this->username = $username; if (null !== $type) { if (!\in_array($type, ['anime', 'manga'])) { throw new \InvalidArgumentException(sprintf('Type %s is not valid', $type)); } $this->type = $type; } }
UserHistoryRequest constructor. @param string $username @param null $type @throws \InvalidArgumentException
__construct
php
jikan-me/jikan
src/Request/User/UserHistoryRequest.php
https://github.com/jikan-me/jikan/blob/master/src/Request/User/UserHistoryRequest.php
MIT
public function __construct(string $username) { $this->username = $username; }
UserProfileRequest constructor. @param string $username
__construct
php
jikan-me/jikan
src/Request/User/UserProfileRequest.php
https://github.com/jikan-me/jikan/blob/master/src/Request/User/UserProfileRequest.php
MIT
public function __construct(int $id, ?string $topic = null) { $this->id = $id; $this->topic = $topic; }
MangaForumRequest constructor. @param int $id @param string|null $topic
__construct
php
jikan-me/jikan
src/Request/Manga/MangaForumRequest.php
https://github.com/jikan-me/jikan/blob/master/src/Request/Manga/MangaForumRequest.php
MIT
public function __construct(int $id, int $page = 1, string $sort = Constants::REVIEWS_SORT_MOST_VOTED, bool $spoilers = true, bool $preliminary = true) { $this->id = $id; $this->page = $page; $this->sort = $sort; $this->spoilers = $spoilers; $this->preliminary = $preliminary; }
MangaReviewsRequest constructor. @param int $id @param int $page
__construct
php
jikan-me/jikan
src/Request/Manga/MangaReviewsRequest.php
https://github.com/jikan-me/jikan/blob/master/src/Request/Manga/MangaReviewsRequest.php
MIT
public function __construct(int $id, int $page = 1) { $this->id = $id; $this->page = ($page - 1) * 75; }
MangaRecentlyUpdatedByUsersRequest constructor. @param int $id @param int $page
__construct
php
jikan-me/jikan
src/Request/Manga/MangaRecentlyUpdatedByUsersRequest.php
https://github.com/jikan-me/jikan/blob/master/src/Request/Manga/MangaRecentlyUpdatedByUsersRequest.php
MIT
public function __construct(int $id, int $episodeId) { $this->id = $id; $this->episodeId = $episodeId; }
AnimeEpisodeRequest constructor. @param int $id @param int $page
__construct
php
jikan-me/jikan
src/Request/Anime/AnimeEpisodeRequest.php
https://github.com/jikan-me/jikan/blob/master/src/Request/Anime/AnimeEpisodeRequest.php
MIT
public function __construct(int $id, int $page) { $this->id = $id; $this->page = $page; }
AnimeVideosEpisodesRequest constructor. @param int $id
__construct
php
jikan-me/jikan
src/Request/Anime/AnimeVideosEpisodesRequest.php
https://github.com/jikan-me/jikan/blob/master/src/Request/Anime/AnimeVideosEpisodesRequest.php
MIT
public function __construct(int $id, int $page = 1) { $this->id = $id; $this->page = ($page - 1) * 100; }
AnimeEpisodesRequest constructor. @param int $id @param int $page
__construct
php
jikan-me/jikan
src/Request/Anime/AnimeEpisodesRequest.php
https://github.com/jikan-me/jikan/blob/master/src/Request/Anime/AnimeEpisodesRequest.php
MIT
public function __construct(?string $query = null, int $page = 1) { $this->query = $query; $this->page = $page; $this->query = $this->query ?? ''; $querySize = strlen($this->query); if ($querySize > 0 && $querySize < 3) { throw new BadResponseException('Search with queries require at least 3 characters'); } }
CharacterSearchRequest constructor. @param string|null $query @param int $page
__construct
php
jikan-me/jikan
src/Request/Search/CharacterSearchRequest.php
https://github.com/jikan-me/jikan/blob/master/src/Request/Search/CharacterSearchRequest.php
MIT
public function __construct(?string $fullId = null) { if ($fullId === null) { $this->regenerate(); } else { $this->fullId = $fullId; $this->decode(); } }
Id constructor. If id is known, pass it here, if you want to generate a new id, pass nothing @param string|null $fullId
__construct
php
aternosorg/mclogs
core/src/Id.php
https://github.com/aternosorg/mclogs/blob/master/core/src/Id.php
MIT
protected function deobfuscateContent() { /** * @var ?Information $version */ $version = $this->analysis->getFilteredInsights(VanillaVersionInformation::class)[0] ?? null; if (!$version) { return; } $version = $version->getValue(); try { $map = $this->getObfuscationMap($version); } catch (\Exception) { $map = null; } if ($map === null) { return; } $this->obfuscatedContent = new ObfuscatedString($this->data, $map); if ($content = $this->obfuscatedContent->getMappedContent()) { $this->data = $content; $this->log = (new Detective())->setLogFile(new StringLogFile($this->data))->detect(); $this->log->parse(); } }
deobfuscate the content of this log @return void
deobfuscateContent
php
aternosorg/mclogs
core/src/Log.php
https://github.com/aternosorg/mclogs/blob/master/core/src/Log.php
MIT
public function renew() { $config = Config::Get('storage'); /** * @var StorageInterface $storage */ $storage = $config['storages'][$this->id->getStorage()]['class']; $storage::Renew($this->id); }
Renew the expiry timestamp to expand the ttl
renew
php
aternosorg/mclogs
core/src/Log.php
https://github.com/aternosorg/mclogs/blob/master/core/src/Log.php
MIT
protected function curlPost($encoded_data) { if ($this->use_ssl) { $uri = 'https://'.$this->getPaypalHost().'/cgi-bin/webscr'; $this->post_uri = $uri; } else { $uri = 'http://'.$this->getPaypalHost().'/cgi-bin/webscr'; $this->post_uri = $uri; } $ch = curl_init(); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 2); curl_setopt($ch, CURLOPT_CAINFO, dirname(__FILE__)."/cert/api_cert_chain.crt"); curl_setopt($ch, CURLOPT_URL, $uri); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, $encoded_data); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, $this->follow_location); curl_setopt($ch, CURLOPT_TIMEOUT, $this->timeout); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HEADER, true); if ($this->force_ssl_v3) { curl_setopt($ch, CURLOPT_SSLVERSION, 3); } $this->response = curl_exec($ch); $this->response_status = strval(curl_getinfo($ch, CURLINFO_HTTP_CODE)); if ($this->response === false || $this->response_status == '0') { $errno = curl_errno($ch); $errstr = curl_error($ch); throw new Exception("cURL error: [$errno] $errstr"); } }
Post Back Using cURL Sends the post back to PayPal using the cURL library. Called by the processIpn() method if the use_curl property is true. Throws an exception if the post fails. Populates the response, response_status, and post_uri properties on success. @param string The post data as a URL encoded string
curlPost
php
MicahCarrick/PHP-PayPal-IPN
ipnlistener.php
https://github.com/MicahCarrick/PHP-PayPal-IPN/blob/master/ipnlistener.php
BSD-3-Clause
protected function fsockPost($encoded_data) { if ($this->use_ssl) { $uri = 'ssl://'.$this->getPaypalHost(); $port = '443'; $this->post_uri = $uri.'/cgi-bin/webscr'; } else { $uri = $this->getPaypalHost(); // no "http://" in call to fsockopen() $port = '80'; $this->post_uri = 'http://'.$uri.'/cgi-bin/webscr'; } $fp = fsockopen($uri, $port, $errno, $errstr, $this->timeout); if (!$fp) { // fsockopen error throw new Exception("fsockopen error: [$errno] $errstr"); } $header = "POST /cgi-bin/webscr HTTP/1.1\r\n"; $header .= "Host: ".$this->getPaypalHost()."\r\n"; $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; $header .= "Content-Length: ".strlen($encoded_data)."\r\n"; $header .= "Connection: Close\r\n\r\n"; fputs($fp, $header.$encoded_data."\r\n\r\n"); while(!feof($fp)) { if (empty($this->response)) { // extract HTTP status from first line $this->response .= $status = fgets($fp, 1024); $this->response_status = trim(substr($status, 9, 4)); } else { $this->response .= fgets($fp, 1024); } } fclose($fp); }
Post Back Using fsockopen() Sends the post back to PayPal using the fsockopen() function. Called by the processIpn() method if the use_curl property is false. Throws an exception if the post fails. Populates the response, response_status, and post_uri properties on success. @param string The post data as a URL encoded string
fsockPost
php
MicahCarrick/PHP-PayPal-IPN
ipnlistener.php
https://github.com/MicahCarrick/PHP-PayPal-IPN/blob/master/ipnlistener.php
BSD-3-Clause
public function getPostUri() { return $this->post_uri; }
Get POST URI Returns the URI that was used to send the post back to PayPal. This can be useful for troubleshooting connection problems. The default URI would be "ssl://www.sandbox.paypal.com:443/cgi-bin/webscr" @return string
getPostUri
php
MicahCarrick/PHP-PayPal-IPN
ipnlistener.php
https://github.com/MicahCarrick/PHP-PayPal-IPN/blob/master/ipnlistener.php
BSD-3-Clause
public function getResponse() { return $this->response; }
Get Response Returns the entire response from PayPal as a string including all the HTTP headers. @return string
getResponse
php
MicahCarrick/PHP-PayPal-IPN
ipnlistener.php
https://github.com/MicahCarrick/PHP-PayPal-IPN/blob/master/ipnlistener.php
BSD-3-Clause
public function getResponseStatus() { return $this->response_status; }
Get Response Status Returns the HTTP response status code from PayPal. This should be "200" if the post back was successful. @return string
getResponseStatus
php
MicahCarrick/PHP-PayPal-IPN
ipnlistener.php
https://github.com/MicahCarrick/PHP-PayPal-IPN/blob/master/ipnlistener.php
BSD-3-Clause
public function requirePostMethod() { // require POST requests if ($_SERVER['REQUEST_METHOD'] && $_SERVER['REQUEST_METHOD'] != 'POST') { header('Allow: POST', true, 405); throw new Exception("Invalid HTTP request method."); } }
Require Post Method Throws an exception and sets a HTTP 405 response header if the request method was not POST.
requirePostMethod
php
MicahCarrick/PHP-PayPal-IPN
ipnlistener.php
https://github.com/MicahCarrick/PHP-PayPal-IPN/blob/master/ipnlistener.php
BSD-3-Clause
public function process(File $phpcsFile, $stackPtr) { $tokens = $phpcsFile->getTokens(); $function = $stackPtr; $scopes = array( 0 => T_PUBLIC, 1 => T_PROTECTED, 2 => T_PRIVATE, ); $whitelisted = array( '__construct', 'setUp', 'tearDown', ); while ($function) { $end = null; if (isset($tokens[$stackPtr]['scope_closer'])) { $end = $tokens[$stackPtr]['scope_closer']; } $function = $phpcsFile->findNext( array( T_ANON_CLASS, T_FUNCTION, ), $function + 1, $end ); if (T_ANON_CLASS === $tokens[$function]['code']) { $function = $tokens[$function]['scope_closer']; continue; } if (isset($tokens[$function]['parenthesis_opener'])) { $scope = $phpcsFile->findPrevious($scopes, $function -1, $stackPtr); $name = $phpcsFile->findNext( T_STRING, $function + 1, $tokens[$function]['parenthesis_opener'] ); if ($scope && $name && !in_array( $tokens[$name]['content'], $whitelisted, true ) ) { $current = array_keys($scopes, $tokens[$scope]['code'], true); $current = $current[0]; $error = 'Declare public methods first,' .'then protected ones and finally private ones'; if (isset($previous) && $current < $previous) { $phpcsFile->addError( $error, $scope, 'Invalid' ); } $previous = $current; } } } }
Processes this test, when one of its tokens is encountered. @param File $phpcsFile The file being scanned. @param int $stackPtr The position of the current token in the stack passed in $tokens. @return void
process
php
djoos/Symfony-coding-standard
Symfony/Sniffs/Functions/ScopeOrderSniff.php
https://github.com/djoos/Symfony-coding-standard/blob/master/Symfony/Sniffs/Functions/ScopeOrderSniff.php
MIT
public function register() { return [ T_FUNCTION, ]; }
Registers the tokens that this sniff wants to listen for. @return array
register
php
djoos/Symfony-coding-standard
Symfony/Sniffs/Functions/ReturnTypeSniff.php
https://github.com/djoos/Symfony-coding-standard/blob/master/Symfony/Sniffs/Functions/ReturnTypeSniff.php
MIT
public function process(File $phpcsFile, $stackPtr) { $tokens = $phpcsFile->getTokens(); $methodProperties = $phpcsFile->getMethodProperties($stackPtr); $type = $methodProperties['return_type_token']; if (false === $type || 'void' !== strtolower($tokens[$type]['content'])) { return; } $next = $stackPtr; do { if (!isset($tokens[$stackPtr]['scope_closer'])) { break; } $next = $phpcsFile->findNext( T_RETURN, $next + 1, $tokens[$stackPtr]['scope_closer'] ); if (false === $next) { break; } $conditions = $tokens[$next]['conditions']; $lastScope = key(array_slice($conditions, -1, null, true)); if ($stackPtr !== $lastScope) { continue; } if (T_SEMICOLON !== $tokens[$next + 1]['code']) { $error = 'Use return null; when a function explicitly '; $error .= 'returns null values and use return; '; $error .= 'when the function returns void values'; $phpcsFile->addError( $error, $next, 'Invalid' ); } } while (true); }
Called when one of the token types that this sniff is listening for is found. @param File $phpcsFile The file where the token was found. @param int $stackPtr The position of the current token in the stack passed in $tokens. @return void|int Optionally returns a stack pointer. The sniff will not be called again on the current file until the returned stack pointer is reached. Return (count($tokens) + 1) to skip the rest of the file.
process
php
djoos/Symfony-coding-standard
Symfony/Sniffs/Functions/ReturnTypeSniff.php
https://github.com/djoos/Symfony-coding-standard/blob/master/Symfony/Sniffs/Functions/ReturnTypeSniff.php
MIT
public function process(File $phpcsFile, $stackPtr) { $tokens = $phpcsFile->getTokens(); $current = $stackPtr; $previousLine = $tokens[$stackPtr]['line'] - 1; $prevLineTokens = array(); $spaceTokens = [ 'T_WHITESPACE', 'T_COMMENT', 'T_DOC_COMMENT_CLOSE_TAG', 'T_DOC_COMMENT_WHITESPACE', ]; while ($current >= 0 && $tokens[$current]['line'] >= $previousLine) { if ($tokens[$current]['line'] === $previousLine && !in_array($tokens[$current]['type'], $spaceTokens, true) ) { $prevLineTokens[] = $tokens[$current]['type']; } $current--; } if (isset($prevLineTokens[0]) && ($prevLineTokens[0] === 'T_OPEN_CURLY_BRACKET' || $prevLineTokens[0] === 'T_COLON') ) { return; } if (count($prevLineTokens) > 0) { $fix = $phpcsFile->addFixableError( 'Missing blank line before return statement', $stackPtr, 'MissedBlankLineBeforeReturn' ); if ($fix === true) { $phpcsFile->fixer->beginChangeset(); $i = 1; while ($tokens[$stackPtr-$i]['type'] === 'T_WHITESPACE') { $i++; } $phpcsFile->fixer->addNewline($stackPtr-$i); $phpcsFile->fixer->endChangeset(); } } }
Processes this test, when one of its tokens is encountered. @param File $phpcsFile All the tokens found in the document. @param int $stackPtr The position of the current token in the stack passed in $tokens. @return void
process
php
djoos/Symfony-coding-standard
Symfony/Sniffs/Formatting/BlankLineBeforeReturnSniff.php
https://github.com/djoos/Symfony-coding-standard/blob/master/Symfony/Sniffs/Formatting/BlankLineBeforeReturnSniff.php
MIT
public function process(File $phpcsFile, $stackPtr) { $filename = $phpcsFile->getFilename(); if ($filename === 'STDIN') { return; } $filename = str_replace('_', '', basename($filename, '.php')); if (false === ctype_alnum($filename)) { $error = sprintf( 'Filename "%s" contains non alphanumeric characters', $filename ); $phpcsFile->addError($error, $stackPtr, 'Invalid'); $phpcsFile->recordMetric($stackPtr, 'Alphanumeric filename', 'no'); } else { $phpcsFile->recordMetric($stackPtr, 'Alphanumeric filename', 'yes'); } // Ignore the rest of the file. return ($phpcsFile->numTokens + 1); }
Process. @param File $phpcsFile The file where the token was found. @param int $stackPtr The position of the current token in the stack passed in $tokens. @return void|int Optionally returns a stack pointer. The sniff will not be called again on the current file until the returned stack pointer is reached. Return (count($tokens) + 1) to skip the rest of the file.
process
php
djoos/Symfony-coding-standard
Symfony/Sniffs/Files/AlphanumericFilenameSniff.php
https://github.com/djoos/Symfony-coding-standard/blob/master/Symfony/Sniffs/Files/AlphanumericFilenameSniff.php
MIT
protected function processTags($phpcsFile, $stackPtr, $commentStart) { $tokens = $phpcsFile->getTokens(); foreach ($tokens[$commentStart]['comment_tags'] as $tag) { $name = $tokens[$tag]['content']; if (in_array($name, $this->blacklist, true)) { $error = sprintf('The %s tag is not allowed.', $name); $phpcsFile->addError($error, $tag, 'Blacklisted'); } } parent::processTags($phpcsFile, $stackPtr, $commentStart); }
Processes each tag and raise an error if there are blacklisted tags. @param File $phpcsFile The file where the token was found. @param int $stackPtr The position of the current token in the stack passed in $tokens. @param int $commentStart Position in the stack where the comment started. @return void
processTags
php
djoos/Symfony-coding-standard
Symfony/Sniffs/Commenting/ClassCommentSniff.php
https://github.com/djoos/Symfony-coding-standard/blob/master/Symfony/Sniffs/Commenting/ClassCommentSniff.php
MIT
protected function processReturn( File $phpcsFile, $stackPtr, $commentStart ) { if ($this->isInheritDoc($phpcsFile, $stackPtr)) { return; } $tokens = $phpcsFile->getTokens(); // Only check for a return comment if a non-void return statement exists if (isset($tokens[$stackPtr]['scope_opener'])) { // Start inside the function $start = $phpcsFile->findNext( T_OPEN_CURLY_BRACKET, $stackPtr, $tokens[$stackPtr]['scope_closer'] ); for ($i = $start; $i < $tokens[$stackPtr]['scope_closer']; ++$i) { // Skip closures if ($tokens[$i]['code'] === T_CLOSURE) { $i = $tokens[$i]['scope_closer']; continue; } // Found a return not in a closure statement // Run the check on the first which is not only 'return;' if ($tokens[$i]['code'] === T_RETURN && $this->isMatchingReturn($tokens, $i) ) { parent::processReturn($phpcsFile, $stackPtr, $commentStart); break; } } } }
Process the return comment of this function comment. @param File $phpcsFile The file being scanned. @param int $stackPtr The position of the current token in the stack passed in $tokens. @param int $commentStart The position in the stack where the comment started. @return void
processReturn
php
djoos/Symfony-coding-standard
Symfony/Sniffs/Commenting/FunctionCommentSniff.php
https://github.com/djoos/Symfony-coding-standard/blob/master/Symfony/Sniffs/Commenting/FunctionCommentSniff.php
MIT
protected function isInheritDoc(File $phpcsFile, $stackPtr) { $start = $phpcsFile->findPrevious(T_DOC_COMMENT_OPEN_TAG, $stackPtr - 1); $end = $phpcsFile->findNext(T_DOC_COMMENT_CLOSE_TAG, $start); $content = $phpcsFile->getTokensAsString($start, $end - $start); return preg_match('#({@inheritdoc}|(?<!{)@inheritdoc(?!}))#i', $content) === 1; }
Is the comment an inheritdoc? @param File $phpcsFile The file being scanned. @param int $stackPtr The position of the current token in the stack passed in $tokens. @return boolean True if the comment is an inheritdoc
isInheritDoc
php
djoos/Symfony-coding-standard
Symfony/Sniffs/Commenting/FunctionCommentSniff.php
https://github.com/djoos/Symfony-coding-standard/blob/master/Symfony/Sniffs/Commenting/FunctionCommentSniff.php
MIT
protected function processParams( File $phpcsFile, $stackPtr, $commentStart ) { if ($this->isInheritDoc($phpcsFile, $stackPtr)) { return; } parent::processParams($phpcsFile, $stackPtr, $commentStart); }
Process the function parameter comments. @param File $phpcsFile The file being scanned. @param int $stackPtr The position of the current token in the stack passed in $tokens. @param int $commentStart The position in the stack where the comment started. @return void
processParams
php
djoos/Symfony-coding-standard
Symfony/Sniffs/Commenting/FunctionCommentSniff.php
https://github.com/djoos/Symfony-coding-standard/blob/master/Symfony/Sniffs/Commenting/FunctionCommentSniff.php
MIT
protected function isMatchingReturn($tokens, $returnPos) { do { $returnPos++; } while ($tokens[$returnPos]['code'] === T_WHITESPACE); return $tokens[$returnPos]['code'] !== T_SEMICOLON; }
Is the return statement matching? @param array $tokens Array of tokens @param int $returnPos Stack position of the T_RETURN token to process @return boolean True if the return does not return anything
isMatchingReturn
php
djoos/Symfony-coding-standard
Symfony/Sniffs/Commenting/FunctionCommentSniff.php
https://github.com/djoos/Symfony-coding-standard/blob/master/Symfony/Sniffs/Commenting/FunctionCommentSniff.php
MIT
public function __construct(array $properties = []) { foreach ($properties as $property => $value) { if (property_exists($this, $property)) { $this->{$property} = $value; } } }
VideoGrant class constructor. @param array $properties A list of properties with values to assign upon initializing the class.
__construct
php
agence104/livekit-server-sdk-php
src/VideoGrant.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/VideoGrant.php
Apache-2.0
public function __construct(?string $apiKey = NULL, ?string $apiSecret = NULL) { $apiKey = $apiKey ?? getenv('LIVEKIT_API_KEY'); $apiSecret = $apiSecret ?? getenv('LIVEKIT_API_SECRET'); if (!$apiKey || !$apiSecret) { throw new \Exception('ApiKey and apiSecret are required.'); } $this->apiKey = $apiKey; $this->apiSecret = $apiSecret; }
AccessToken Constructor. @param string|null $apiKey The LiveKit API Key, can be set in env LIVEKIT_API_KEY. @param string|null $apiSecret The LiveKit API Secret Key, can be set in env LIVEKIT_API_SECRET. @throws \Exception
__construct
php
agence104/livekit-server-sdk-php
src/AccessToken.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/AccessToken.php
Apache-2.0
public function __construct(array $properties = []) { foreach ($properties as $property => $value) { if (property_exists($this, $property)) { if ($property == 'videoGrant') { $this->{$property} = new VideoGrant($value); } else { $this->{$property} = $value; } } } }
ClaimGrants class constructor. @param array $properties A list of properties with values to assign upon initializing the class.
__construct
php
agence104/livekit-server-sdk-php
src/ClaimGrants.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/ClaimGrants.php
Apache-2.0
public function __construct(?string $apiKey = NULL, ?string $apiSecret = NULL) { $apiKey = $apiKey ?? getenv('LIVEKIT_API_KEY'); $apiSecret = $apiSecret ?? getenv('LIVEKIT_API_SECRET'); if (!$apiKey || !$apiSecret) { throw new \Exception('ApiKey and apiSecret are required.'); } $this->accessToken = new AccessToken($apiKey, $apiSecret); }
WebhookReceiver Constructor. @param string|null $apiKey The LiveKit API Key, can be set in env LIVEKIT_API_KEY. @param string|null $apiSecret The LiveKit API Secret Key, can be set in env LIVEKIT_API_SECRET. @throws \Exception
__construct
php
agence104/livekit-server-sdk-php
src/WebhookReceiver.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/WebhookReceiver.php
Apache-2.0
public function __construct(?string $host = NULL, ?string $apiKey = NULL, ?string $apiSecret = NULL) { // Using LIVEKIT_HOST is deprecated and support will be removed in the next // version. Use LIVEKIT_URL instead. $host = $host ?? getenv('LIVEKIT_URL') ?? getenv('LIVEKIT_HOST'); $apiKey = $apiKey ?? getenv('LIVEKIT_API_KEY'); $apiSecret = $apiSecret ?? getenv('LIVEKIT_API_SECRET'); if (!$apiKey || !$apiSecret) { throw new \Exception('ApiKey and apiSecret are required.'); } $this->host = $host; $this->apiKey = $apiKey; $this->apiSecret = $apiSecret; }
BaseServiceClient Class Constructor. @param string|null $host The hostname including protocol. i.e. 'https://cluster.livekit.io'. @param string|null $apiKey The API Key, can be set in env var LIVEKIT_API_KEY. @param string|null $apiSecret The API Secret, can be set in env var LIVEKIT_API_SECRET. @throws \Exception
__construct
php
agence104/livekit-server-sdk-php
src/BaseServiceClient.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/BaseServiceClient.php
Apache-2.0
public function getItems() { return $this->items; }
Generated from protobuf field <code>repeated .livekit.SIPOutboundTrunkInfo items = 1;</code> @return \Google\Protobuf\Internal\RepeatedField
getItems
php
agence104/livekit-server-sdk-php
src/proto/Livekit/ListSIPOutboundTrunkResponse.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/ListSIPOutboundTrunkResponse.php
Apache-2.0
public function setItems($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Livekit\SIPOutboundTrunkInfo::class); $this->items = $arr; return $this; }
Generated from protobuf field <code>repeated .livekit.SIPOutboundTrunkInfo items = 1;</code> @param \Livekit\SIPOutboundTrunkInfo[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
setItems
php
agence104/livekit-server-sdk-php
src/proto/Livekit/ListSIPOutboundTrunkResponse.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/ListSIPOutboundTrunkResponse.php
Apache-2.0
public function getInfo() { return $this->info; }
Generated from protobuf field <code>repeated .livekit.StreamInfo info = 1;</code> @return \Google\Protobuf\Internal\RepeatedField
getInfo
php
agence104/livekit-server-sdk-php
src/proto/Livekit/StreamInfoList.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/StreamInfoList.php
Apache-2.0
public function setInfo($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Livekit\StreamInfo::class); $this->info = $arr; return $this; }
Generated from protobuf field <code>repeated .livekit.StreamInfo info = 1;</code> @param \Livekit\StreamInfo[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
setInfo
php
agence104/livekit-server-sdk-php
src/proto/Livekit/StreamInfoList.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/StreamInfoList.php
Apache-2.0
public function getRule() { return $this->rule; }
Generated from protobuf field <code>.livekit.SIPDispatchRule rule = 1;</code> @return \Livekit\SIPDispatchRule|null
getRule
php
agence104/livekit-server-sdk-php
src/proto/Livekit/CreateSIPDispatchRuleRequest.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/CreateSIPDispatchRuleRequest.php
Apache-2.0
public function setRule($var) { GPBUtil::checkMessage($var, \Livekit\SIPDispatchRule::class); $this->rule = $var; return $this; }
Generated from protobuf field <code>.livekit.SIPDispatchRule rule = 1;</code> @param \Livekit\SIPDispatchRule $var @return $this
setRule
php
agence104/livekit-server-sdk-php
src/proto/Livekit/CreateSIPDispatchRuleRequest.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/CreateSIPDispatchRuleRequest.php
Apache-2.0
public function getTrunkIds() { return $this->trunk_ids; }
What trunks are accepted for this dispatch rule If empty all trunks will match this dispatch rule Generated from protobuf field <code>repeated string trunk_ids = 2;</code> @return \Google\Protobuf\Internal\RepeatedField
getTrunkIds
php
agence104/livekit-server-sdk-php
src/proto/Livekit/CreateSIPDispatchRuleRequest.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/CreateSIPDispatchRuleRequest.php
Apache-2.0
public function setTrunkIds($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $this->trunk_ids = $arr; return $this; }
What trunks are accepted for this dispatch rule If empty all trunks will match this dispatch rule Generated from protobuf field <code>repeated string trunk_ids = 2;</code> @param string[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
setTrunkIds
php
agence104/livekit-server-sdk-php
src/proto/Livekit/CreateSIPDispatchRuleRequest.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/CreateSIPDispatchRuleRequest.php
Apache-2.0
public function getHidePhoneNumber() { return $this->hide_phone_number; }
By default the From value (Phone number) is used for participant name/identity and added to attributes. If true, a random value for identity will be used and numbers will be omitted from attributes. Generated from protobuf field <code>bool hide_phone_number = 3;</code> @return bool
getHidePhoneNumber
php
agence104/livekit-server-sdk-php
src/proto/Livekit/CreateSIPDispatchRuleRequest.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/CreateSIPDispatchRuleRequest.php
Apache-2.0
public function setHidePhoneNumber($var) { GPBUtil::checkBool($var); $this->hide_phone_number = $var; return $this; }
By default the From value (Phone number) is used for participant name/identity and added to attributes. If true, a random value for identity will be used and numbers will be omitted from attributes. Generated from protobuf field <code>bool hide_phone_number = 3;</code> @param bool $var @return $this
setHidePhoneNumber
php
agence104/livekit-server-sdk-php
src/proto/Livekit/CreateSIPDispatchRuleRequest.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/CreateSIPDispatchRuleRequest.php
Apache-2.0
public function getInboundNumbers() { return $this->inbound_numbers; }
Dispatch Rule will only accept a call made to these numbers (if set). Generated from protobuf field <code>repeated string inbound_numbers = 6;</code> @return \Google\Protobuf\Internal\RepeatedField
getInboundNumbers
php
agence104/livekit-server-sdk-php
src/proto/Livekit/CreateSIPDispatchRuleRequest.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/CreateSIPDispatchRuleRequest.php
Apache-2.0
public function setInboundNumbers($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING); $this->inbound_numbers = $arr; return $this; }
Dispatch Rule will only accept a call made to these numbers (if set). Generated from protobuf field <code>repeated string inbound_numbers = 6;</code> @param string[]|\Google\Protobuf\Internal\RepeatedField $var @return $this
setInboundNumbers
php
agence104/livekit-server-sdk-php
src/proto/Livekit/CreateSIPDispatchRuleRequest.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/CreateSIPDispatchRuleRequest.php
Apache-2.0
public function getName() { return $this->name; }
Optional human-readable name for the Dispatch Rule. Generated from protobuf field <code>string name = 4;</code> @return string
getName
php
agence104/livekit-server-sdk-php
src/proto/Livekit/CreateSIPDispatchRuleRequest.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/CreateSIPDispatchRuleRequest.php
Apache-2.0
public function setName($var) { GPBUtil::checkString($var, True); $this->name = $var; return $this; }
Optional human-readable name for the Dispatch Rule. Generated from protobuf field <code>string name = 4;</code> @param string $var @return $this
setName
php
agence104/livekit-server-sdk-php
src/proto/Livekit/CreateSIPDispatchRuleRequest.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/CreateSIPDispatchRuleRequest.php
Apache-2.0
public function getMetadata() { return $this->metadata; }
User-defined metadata for the Dispatch Rule. Participants created by this rule will inherit this metadata. Generated from protobuf field <code>string metadata = 5;</code> @return string
getMetadata
php
agence104/livekit-server-sdk-php
src/proto/Livekit/CreateSIPDispatchRuleRequest.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/CreateSIPDispatchRuleRequest.php
Apache-2.0
public function setMetadata($var) { GPBUtil::checkString($var, True); $this->metadata = $var; return $this; }
User-defined metadata for the Dispatch Rule. Participants created by this rule will inherit this metadata. Generated from protobuf field <code>string metadata = 5;</code> @param string $var @return $this
setMetadata
php
agence104/livekit-server-sdk-php
src/proto/Livekit/CreateSIPDispatchRuleRequest.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/CreateSIPDispatchRuleRequest.php
Apache-2.0
public function getAttributes() { return $this->attributes; }
User-defined attributes for the Dispatch Rule. Participants created by this rule will inherit these attributes. Generated from protobuf field <code>map<string, string> attributes = 7;</code> @return \Google\Protobuf\Internal\MapField
getAttributes
php
agence104/livekit-server-sdk-php
src/proto/Livekit/CreateSIPDispatchRuleRequest.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/CreateSIPDispatchRuleRequest.php
Apache-2.0
public function setAttributes($var) { $arr = GPBUtil::checkMapField($var, \Google\Protobuf\Internal\GPBType::STRING, \Google\Protobuf\Internal\GPBType::STRING); $this->attributes = $arr; return $this; }
User-defined attributes for the Dispatch Rule. Participants created by this rule will inherit these attributes. Generated from protobuf field <code>map<string, string> attributes = 7;</code> @param array|\Google\Protobuf\Internal\MapField $var @return $this
setAttributes
php
agence104/livekit-server-sdk-php
src/proto/Livekit/CreateSIPDispatchRuleRequest.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/CreateSIPDispatchRuleRequest.php
Apache-2.0
public function getRoomPreset() { return $this->room_preset; }
Cloud-only, config preset to use Generated from protobuf field <code>string room_preset = 8;</code> @return string
getRoomPreset
php
agence104/livekit-server-sdk-php
src/proto/Livekit/CreateSIPDispatchRuleRequest.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/CreateSIPDispatchRuleRequest.php
Apache-2.0
public function setRoomPreset($var) { GPBUtil::checkString($var, True); $this->room_preset = $var; return $this; }
Cloud-only, config preset to use Generated from protobuf field <code>string room_preset = 8;</code> @param string $var @return $this
setRoomPreset
php
agence104/livekit-server-sdk-php
src/proto/Livekit/CreateSIPDispatchRuleRequest.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/CreateSIPDispatchRuleRequest.php
Apache-2.0
public function getRoomConfig() { return $this->room_config; }
RoomConfiguration to use if the participant initiates the room Generated from protobuf field <code>.livekit.RoomConfiguration room_config = 9;</code> @return \Livekit\RoomConfiguration|null
getRoomConfig
php
agence104/livekit-server-sdk-php
src/proto/Livekit/CreateSIPDispatchRuleRequest.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/CreateSIPDispatchRuleRequest.php
Apache-2.0
public function setRoomConfig($var) { GPBUtil::checkMessage($var, \Livekit\RoomConfiguration::class); $this->room_config = $var; return $this; }
RoomConfiguration to use if the participant initiates the room Generated from protobuf field <code>.livekit.RoomConfiguration room_config = 9;</code> @param \Livekit\RoomConfiguration $var @return $this
setRoomConfig
php
agence104/livekit-server-sdk-php
src/proto/Livekit/CreateSIPDispatchRuleRequest.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/CreateSIPDispatchRuleRequest.php
Apache-2.0
public function getAgentName() { return $this->agent_name; }
Generated from protobuf field <code>string agent_name = 1;</code> @return string
getAgentName
php
agence104/livekit-server-sdk-php
src/proto/Livekit/CreateAgentDispatchRequest.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/CreateAgentDispatchRequest.php
Apache-2.0
public function setAgentName($var) { GPBUtil::checkString($var, True); $this->agent_name = $var; return $this; }
Generated from protobuf field <code>string agent_name = 1;</code> @param string $var @return $this
setAgentName
php
agence104/livekit-server-sdk-php
src/proto/Livekit/CreateAgentDispatchRequest.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/CreateAgentDispatchRequest.php
Apache-2.0
public function getRoom() { return $this->room; }
Generated from protobuf field <code>string room = 2;</code> @return string
getRoom
php
agence104/livekit-server-sdk-php
src/proto/Livekit/CreateAgentDispatchRequest.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/CreateAgentDispatchRequest.php
Apache-2.0
public function setRoom($var) { GPBUtil::checkString($var, True); $this->room = $var; return $this; }
Generated from protobuf field <code>string room = 2;</code> @param string $var @return $this
setRoom
php
agence104/livekit-server-sdk-php
src/proto/Livekit/CreateAgentDispatchRequest.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/CreateAgentDispatchRequest.php
Apache-2.0
public function getId() { return $this->id; }
uuid Generated from protobuf field <code>string id = 1;</code> @return string
getId
php
agence104/livekit-server-sdk-php
src/proto/Livekit/ChatMessage.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/ChatMessage.php
Apache-2.0
public function setId($var) { GPBUtil::checkString($var, True); $this->id = $var; return $this; }
uuid Generated from protobuf field <code>string id = 1;</code> @param string $var @return $this
setId
php
agence104/livekit-server-sdk-php
src/proto/Livekit/ChatMessage.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/ChatMessage.php
Apache-2.0
public function getTimestamp() { return $this->timestamp; }
Generated from protobuf field <code>int64 timestamp = 2;</code> @return int|string
getTimestamp
php
agence104/livekit-server-sdk-php
src/proto/Livekit/ChatMessage.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/ChatMessage.php
Apache-2.0
public function setTimestamp($var) { GPBUtil::checkInt64($var); $this->timestamp = $var; return $this; }
Generated from protobuf field <code>int64 timestamp = 2;</code> @param int|string $var @return $this
setTimestamp
php
agence104/livekit-server-sdk-php
src/proto/Livekit/ChatMessage.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/ChatMessage.php
Apache-2.0
public function getEditTimestamp() { return isset($this->edit_timestamp) ? $this->edit_timestamp : 0; }
populated only if the intent is to edit/update an existing message Generated from protobuf field <code>optional int64 edit_timestamp = 3;</code> @return int|string
getEditTimestamp
php
agence104/livekit-server-sdk-php
src/proto/Livekit/ChatMessage.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/ChatMessage.php
Apache-2.0
public function setEditTimestamp($var) { GPBUtil::checkInt64($var); $this->edit_timestamp = $var; return $this; }
populated only if the intent is to edit/update an existing message Generated from protobuf field <code>optional int64 edit_timestamp = 3;</code> @param int|string $var @return $this
setEditTimestamp
php
agence104/livekit-server-sdk-php
src/proto/Livekit/ChatMessage.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/ChatMessage.php
Apache-2.0
public function getMessage() { return $this->message; }
Generated from protobuf field <code>string message = 4;</code> @return string
getMessage
php
agence104/livekit-server-sdk-php
src/proto/Livekit/ChatMessage.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/ChatMessage.php
Apache-2.0
public function setMessage($var) { GPBUtil::checkString($var, True); $this->message = $var; return $this; }
Generated from protobuf field <code>string message = 4;</code> @param string $var @return $this
setMessage
php
agence104/livekit-server-sdk-php
src/proto/Livekit/ChatMessage.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/ChatMessage.php
Apache-2.0
public function getDeleted() { return $this->deleted; }
true to remove message Generated from protobuf field <code>bool deleted = 5;</code> @return bool
getDeleted
php
agence104/livekit-server-sdk-php
src/proto/Livekit/ChatMessage.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/ChatMessage.php
Apache-2.0
public function setDeleted($var) { GPBUtil::checkBool($var); $this->deleted = $var; return $this; }
true to remove message Generated from protobuf field <code>bool deleted = 5;</code> @param bool $var @return $this
setDeleted
php
agence104/livekit-server-sdk-php
src/proto/Livekit/ChatMessage.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/ChatMessage.php
Apache-2.0
public function getGenerated() { return $this->generated; }
true if the chat message has been generated by an agent from a participant's audio transcription Generated from protobuf field <code>bool generated = 6;</code> @return bool
getGenerated
php
agence104/livekit-server-sdk-php
src/proto/Livekit/ChatMessage.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/ChatMessage.php
Apache-2.0
public function setGenerated($var) { GPBUtil::checkBool($var); $this->generated = $var; return $this; }
true if the chat message has been generated by an agent from a participant's audio transcription Generated from protobuf field <code>bool generated = 6;</code> @param bool $var @return $this
setGenerated
php
agence104/livekit-server-sdk-php
src/proto/Livekit/ChatMessage.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/ChatMessage.php
Apache-2.0
public function getAfterId() { return $this->after_id; }
list entities which IDs are greater Generated from protobuf field <code>string after_id = 1;</code> @return string
getAfterId
php
agence104/livekit-server-sdk-php
src/proto/Livekit/Pagination.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/Pagination.php
Apache-2.0
public function setAfterId($var) { GPBUtil::checkString($var, True); $this->after_id = $var; return $this; }
list entities which IDs are greater Generated from protobuf field <code>string after_id = 1;</code> @param string $var @return $this
setAfterId
php
agence104/livekit-server-sdk-php
src/proto/Livekit/Pagination.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/Pagination.php
Apache-2.0
public function getLimit() { return $this->limit; }
Generated from protobuf field <code>int32 limit = 2;</code> @return int
getLimit
php
agence104/livekit-server-sdk-php
src/proto/Livekit/Pagination.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/Pagination.php
Apache-2.0
public function setLimit($var) { GPBUtil::checkInt32($var); $this->limit = $var; return $this; }
Generated from protobuf field <code>int32 limit = 2;</code> @param int $var @return $this
setLimit
php
agence104/livekit-server-sdk-php
src/proto/Livekit/Pagination.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/Pagination.php
Apache-2.0
public function getFilenamePrefix() { return $this->filename_prefix; }
Generated from protobuf field <code>string filename_prefix = 4;</code> @return string
getFilenamePrefix
php
agence104/livekit-server-sdk-php
src/proto/Livekit/ImagesInfo.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/ImagesInfo.php
Apache-2.0
public function setFilenamePrefix($var) { GPBUtil::checkString($var, True); $this->filename_prefix = $var; return $this; }
Generated from protobuf field <code>string filename_prefix = 4;</code> @param string $var @return $this
setFilenamePrefix
php
agence104/livekit-server-sdk-php
src/proto/Livekit/ImagesInfo.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/ImagesInfo.php
Apache-2.0
public function getImageCount() { return $this->image_count; }
Generated from protobuf field <code>int64 image_count = 1;</code> @return int|string
getImageCount
php
agence104/livekit-server-sdk-php
src/proto/Livekit/ImagesInfo.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/ImagesInfo.php
Apache-2.0
public function setImageCount($var) { GPBUtil::checkInt64($var); $this->image_count = $var; return $this; }
Generated from protobuf field <code>int64 image_count = 1;</code> @param int|string $var @return $this
setImageCount
php
agence104/livekit-server-sdk-php
src/proto/Livekit/ImagesInfo.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/ImagesInfo.php
Apache-2.0
public function getStartedAt() { return $this->started_at; }
Generated from protobuf field <code>int64 started_at = 2;</code> @return int|string
getStartedAt
php
agence104/livekit-server-sdk-php
src/proto/Livekit/ImagesInfo.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/ImagesInfo.php
Apache-2.0
public function setStartedAt($var) { GPBUtil::checkInt64($var); $this->started_at = $var; return $this; }
Generated from protobuf field <code>int64 started_at = 2;</code> @param int|string $var @return $this
setStartedAt
php
agence104/livekit-server-sdk-php
src/proto/Livekit/ImagesInfo.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/ImagesInfo.php
Apache-2.0
public function getEndedAt() { return $this->ended_at; }
Generated from protobuf field <code>int64 ended_at = 3;</code> @return int|string
getEndedAt
php
agence104/livekit-server-sdk-php
src/proto/Livekit/ImagesInfo.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/ImagesInfo.php
Apache-2.0
public function setEndedAt($var) { GPBUtil::checkInt64($var); $this->ended_at = $var; return $this; }
Generated from protobuf field <code>int64 ended_at = 3;</code> @param int|string $var @return $this
setEndedAt
php
agence104/livekit-server-sdk-php
src/proto/Livekit/ImagesInfo.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/ImagesInfo.php
Apache-2.0
public function getEdition() { return $this->edition; }
Generated from protobuf field <code>.livekit.ServerInfo.Edition edition = 1;</code> @return int
getEdition
php
agence104/livekit-server-sdk-php
src/proto/Livekit/ServerInfo.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/ServerInfo.php
Apache-2.0
public function setEdition($var) { GPBUtil::checkEnum($var, \Livekit\ServerInfo\Edition::class); $this->edition = $var; return $this; }
Generated from protobuf field <code>.livekit.ServerInfo.Edition edition = 1;</code> @param int $var @return $this
setEdition
php
agence104/livekit-server-sdk-php
src/proto/Livekit/ServerInfo.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/ServerInfo.php
Apache-2.0
public function getVersion() { return $this->version; }
Generated from protobuf field <code>string version = 2;</code> @return string
getVersion
php
agence104/livekit-server-sdk-php
src/proto/Livekit/ServerInfo.php
https://github.com/agence104/livekit-server-sdk-php/blob/master/src/proto/Livekit/ServerInfo.php
Apache-2.0