repository_name
stringlengths
5
67
func_path_in_repository
stringlengths
4
234
func_name
stringlengths
0
314
whole_func_string
stringlengths
52
3.87M
language
stringclasses
6 values
func_code_string
stringlengths
52
3.87M
func_code_tokens
listlengths
15
672k
func_documentation_string
stringlengths
1
47.2k
func_documentation_tokens
listlengths
1
3.92k
split_name
stringclasses
1 value
func_code_url
stringlengths
85
339
fuelphp/filesystem
src/Finder.php
Finder.normalizePath
public function normalizePath($path) { $path = rtrim($path, '/\\').DIRECTORY_SEPARATOR; $path = realpath($path).DIRECTORY_SEPARATOR; if ($this->root and strpos($path, $this->root) !== 0) { throw new \Exception('Cannot access path outside: '.$this->root.'. Trying to access: '.$path); } return $path; }
php
public function normalizePath($path) { $path = rtrim($path, '/\\').DIRECTORY_SEPARATOR; $path = realpath($path).DIRECTORY_SEPARATOR; if ($this->root and strpos($path, $this->root) !== 0) { throw new \Exception('Cannot access path outside: '.$this->root.'. Trying to access: '.$path); } return $path; }
[ "public", "function", "normalizePath", "(", "$", "path", ")", "{", "$", "path", "=", "rtrim", "(", "$", "path", ",", "'/\\\\'", ")", ".", "DIRECTORY_SEPARATOR", ";", "$", "path", "=", "realpath", "(", "$", "path", ")", ".", "DIRECTORY_SEPARATOR", ";", ...
Normalizes a path @param string $path @return string @throws \Exception
[ "Normalizes", "a", "path" ]
train
https://github.com/fuelphp/filesystem/blob/770a8cb04caca920af8029d7aad7208bc0592743/src/Finder.php#L201-L212
fuelphp/filesystem
src/Finder.php
Finder.getPaths
public function getPaths($group = '__DEFAULT__') { if ( ! isset($this->paths[$group])) { return []; } return array_values($this->paths[$group]); }
php
public function getPaths($group = '__DEFAULT__') { if ( ! isset($this->paths[$group])) { return []; } return array_values($this->paths[$group]); }
[ "public", "function", "getPaths", "(", "$", "group", "=", "'__DEFAULT__'", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "paths", "[", "$", "group", "]", ")", ")", "{", "return", "[", "]", ";", "}", "return", "array_values", "(", "$", ...
Returns the paths set up to look in @return array
[ "Returns", "the", "paths", "set", "up", "to", "look", "in" ]
train
https://github.com/fuelphp/filesystem/blob/770a8cb04caca920af8029d7aad7208bc0592743/src/Finder.php#L219-L227
fuelphp/filesystem
src/Finder.php
Finder.setPaths
public function setPaths(array $paths, $clearCache = true, $group = '__DEFAULT__') { $this->paths[$group] = []; $this->addPaths($paths, false, $group); if ($clearCache) { $this->cache = []; } }
php
public function setPaths(array $paths, $clearCache = true, $group = '__DEFAULT__') { $this->paths[$group] = []; $this->addPaths($paths, false, $group); if ($clearCache) { $this->cache = []; } }
[ "public", "function", "setPaths", "(", "array", "$", "paths", ",", "$", "clearCache", "=", "true", ",", "$", "group", "=", "'__DEFAULT__'", ")", "{", "$", "this", "->", "paths", "[", "$", "group", "]", "=", "[", "]", ";", "$", "this", "->", "addPat...
Replaces all the paths @param array $paths
[ "Replaces", "all", "the", "paths" ]
train
https://github.com/fuelphp/filesystem/blob/770a8cb04caca920af8029d7aad7208bc0592743/src/Finder.php#L244-L253
fuelphp/filesystem
src/Finder.php
Finder.findAll
public function findAll($name, $reload = false, $reversed = false, $type = 'all') { $name = trim($name, '\\/'); $scope = 'all::'.$type; $asHandlers = $this->returnHandlers; $group = '__DEFAULT__'; $query = $name; if ($this->nextAsHandlers !== null) { $asHandlers = $this->nextAsHandlers; $this->nex...
php
public function findAll($name, $reload = false, $reversed = false, $type = 'all') { $name = trim($name, '\\/'); $scope = 'all::'.$type; $asHandlers = $this->returnHandlers; $group = '__DEFAULT__'; $query = $name; if ($this->nextAsHandlers !== null) { $asHandlers = $this->nextAsHandlers; $this->nex...
[ "public", "function", "findAll", "(", "$", "name", ",", "$", "reload", "=", "false", ",", "$", "reversed", "=", "false", ",", "$", "type", "=", "'all'", ")", "{", "$", "name", "=", "trim", "(", "$", "name", ",", "'\\\\/'", ")", ";", "$", "scope",...
Finds all files with a given name/subpath. @param string $name @param boolean $reload @param boolean $reversed @param string $type
[ "Finds", "all", "files", "with", "a", "given", "name", "/", "subpath", "." ]
train
https://github.com/fuelphp/filesystem/blob/770a8cb04caca920af8029d7aad7208bc0592743/src/Finder.php#L263-L319
fuelphp/filesystem
src/Finder.php
Finder.findAllFiles
public function findAllFiles($name, $reload = false, $reversed = false) { return $this->findAll($name, $reload, $reversed, 'file'); }
php
public function findAllFiles($name, $reload = false, $reversed = false) { return $this->findAll($name, $reload, $reversed, 'file'); }
[ "public", "function", "findAllFiles", "(", "$", "name", ",", "$", "reload", "=", "false", ",", "$", "reversed", "=", "false", ")", "{", "return", "$", "this", "->", "findAll", "(", "$", "name", ",", "$", "reload", ",", "$", "reversed", ",", "'file'",...
Finds all files with a given name/subpath @param string $name @param boolean $reload @param boolean $reversed
[ "Finds", "all", "files", "with", "a", "given", "name", "/", "subpath" ]
train
https://github.com/fuelphp/filesystem/blob/770a8cb04caca920af8029d7aad7208bc0592743/src/Finder.php#L328-L331
fuelphp/filesystem
src/Finder.php
Finder.findAllDirs
public function findAllDirs($name, $reload = false, $reversed = false) { return $this->findAll($name, $reload, $reversed, 'dir'); }
php
public function findAllDirs($name, $reload = false, $reversed = false) { return $this->findAll($name, $reload, $reversed, 'dir'); }
[ "public", "function", "findAllDirs", "(", "$", "name", ",", "$", "reload", "=", "false", ",", "$", "reversed", "=", "false", ")", "{", "return", "$", "this", "->", "findAll", "(", "$", "name", ",", "$", "reload", ",", "$", "reversed", ",", "'dir'", ...
Finds all directories with a given name/subpath @param string $name @param boolean $reload @param boolean $reversed
[ "Finds", "all", "directories", "with", "a", "given", "name", "/", "subpath" ]
train
https://github.com/fuelphp/filesystem/blob/770a8cb04caca920af8029d7aad7208bc0592743/src/Finder.php#L340-L343
fuelphp/filesystem
src/Finder.php
Finder.findAllReversed
public function findAllReversed($name, $reload = false, $type = 'all') { return $this->findAll($name, $reload, true, $type); }
php
public function findAllReversed($name, $reload = false, $type = 'all') { return $this->findAll($name, $reload, true, $type); }
[ "public", "function", "findAllReversed", "(", "$", "name", ",", "$", "reload", "=", "false", ",", "$", "type", "=", "'all'", ")", "{", "return", "$", "this", "->", "findAll", "(", "$", "name", ",", "$", "reload", ",", "true", ",", "$", "type", ")",...
Reverse-finds all files and directories with a given name/subpath @param string $name @param boolean $reload @param string $type
[ "Reverse", "-", "finds", "all", "files", "and", "directories", "with", "a", "given", "name", "/", "subpath" ]
train
https://github.com/fuelphp/filesystem/blob/770a8cb04caca920af8029d7aad7208bc0592743/src/Finder.php#L352-L355
fuelphp/filesystem
src/Finder.php
Finder.findFile
public function findFile($name, $reload = false, $reversed = false) { return $this->find($name, $reload, $reversed, 'file'); }
php
public function findFile($name, $reload = false, $reversed = false) { return $this->find($name, $reload, $reversed, 'file'); }
[ "public", "function", "findFile", "(", "$", "name", ",", "$", "reload", "=", "false", ",", "$", "reversed", "=", "false", ")", "{", "return", "$", "this", "->", "find", "(", "$", "name", ",", "$", "reload", ",", "$", "reversed", ",", "'file'", ")",...
Finds one file with a given name/subpath @param string $name @param boolean $reload @param boolean $reversed
[ "Finds", "one", "file", "with", "a", "given", "name", "/", "subpath" ]
train
https://github.com/fuelphp/filesystem/blob/770a8cb04caca920af8029d7aad7208bc0592743/src/Finder.php#L470-L473
fuelphp/filesystem
src/Finder.php
Finder.findDir
public function findDir($name, $reload = false, $reversed = false) { return $this->find($name, $reload, $reversed, 'dir'); }
php
public function findDir($name, $reload = false, $reversed = false) { return $this->find($name, $reload, $reversed, 'dir'); }
[ "public", "function", "findDir", "(", "$", "name", ",", "$", "reload", "=", "false", ",", "$", "reversed", "=", "false", ")", "{", "return", "$", "this", "->", "find", "(", "$", "name", ",", "$", "reload", ",", "$", "reversed", ",", "'dir'", ")", ...
Finds one directories with a given name/subpath @param string $name @param boolean $reload @param boolean $reversed
[ "Finds", "one", "directories", "with", "a", "given", "name", "/", "subpath" ]
train
https://github.com/fuelphp/filesystem/blob/770a8cb04caca920af8029d7aad7208bc0592743/src/Finder.php#L482-L485
fuelphp/filesystem
src/Finder.php
Finder.findReversed
public function findReversed($name, $reload = false, $type = 'all') { return $this->find($name, $reload, true, $type); }
php
public function findReversed($name, $reload = false, $type = 'all') { return $this->find($name, $reload, true, $type); }
[ "public", "function", "findReversed", "(", "$", "name", ",", "$", "reload", "=", "false", ",", "$", "type", "=", "'all'", ")", "{", "return", "$", "this", "->", "find", "(", "$", "name", ",", "$", "reload", ",", "true", ",", "$", "type", ")", ";"...
Reverse-finds one file or directory with a given name/subpath @param string $name @param boolean $reload @param boolean $reversed @param string $type
[ "Reverse", "-", "finds", "one", "file", "or", "directory", "with", "a", "given", "name", "/", "subpath" ]
train
https://github.com/fuelphp/filesystem/blob/770a8cb04caca920af8029d7aad7208bc0592743/src/Finder.php#L495-L498
fuelphp/filesystem
src/Finder.php
Finder.findCached
public function findCached($scope, $name, $reversed) { $cacheKey = $this->makeCacheKey($scope, $name, $reversed); if (isset($this->cache[$cacheKey])) { return $this->cache[$cacheKey]['result']; } }
php
public function findCached($scope, $name, $reversed) { $cacheKey = $this->makeCacheKey($scope, $name, $reversed); if (isset($this->cache[$cacheKey])) { return $this->cache[$cacheKey]['result']; } }
[ "public", "function", "findCached", "(", "$", "scope", ",", "$", "name", ",", "$", "reversed", ")", "{", "$", "cacheKey", "=", "$", "this", "->", "makeCacheKey", "(", "$", "scope", ",", "$", "name", ",", "$", "reversed", ")", ";", "if", "(", "isset...
Retrieves a location from cache @param string $scope @param string $name @param boolean $reversed @return string|array
[ "Retrieves", "a", "location", "from", "cache" ]
train
https://github.com/fuelphp/filesystem/blob/770a8cb04caca920af8029d7aad7208bc0592743/src/Finder.php#L533-L541
fuelphp/filesystem
src/Finder.php
Finder.cache
public function cache($scope, $name, $reversed, $result, $pathsUsed = []) { $cacheKey = $this->makeCacheKey($scope, $name, $reversed); $this->cache[$cacheKey] = [ 'result' => $result, 'used' => $pathsUsed, ]; }
php
public function cache($scope, $name, $reversed, $result, $pathsUsed = []) { $cacheKey = $this->makeCacheKey($scope, $name, $reversed); $this->cache[$cacheKey] = [ 'result' => $result, 'used' => $pathsUsed, ]; }
[ "public", "function", "cache", "(", "$", "scope", ",", "$", "name", ",", "$", "reversed", ",", "$", "result", ",", "$", "pathsUsed", "=", "[", "]", ")", "{", "$", "cacheKey", "=", "$", "this", "->", "makeCacheKey", "(", "$", "scope", ",", "$", "n...
Caches a find result @param string $scope @param string $name @param boolean $reversed @param array $pathsUsed
[ "Caches", "a", "find", "result" ]
train
https://github.com/fuelphp/filesystem/blob/770a8cb04caca920af8029d7aad7208bc0592743/src/Finder.php#L559-L566
fuelphp/filesystem
src/Finder.php
Finder.makeCacheKey
public function makeCacheKey($scope, $name, $reversed) { $cacheKey = $scope.'::'.$name; if ($reversed) { $cacheKey .= '::reversed'; } return $cacheKey; }
php
public function makeCacheKey($scope, $name, $reversed) { $cacheKey = $scope.'::'.$name; if ($reversed) { $cacheKey .= '::reversed'; } return $cacheKey; }
[ "public", "function", "makeCacheKey", "(", "$", "scope", ",", "$", "name", ",", "$", "reversed", ")", "{", "$", "cacheKey", "=", "$", "scope", ".", "'::'", ".", "$", "name", ";", "if", "(", "$", "reversed", ")", "{", "$", "cacheKey", ".=", "'::reve...
Generates a cache key @param string $scope @param string $name @param boolean $reversed @return string
[ "Generates", "a", "cache", "key" ]
train
https://github.com/fuelphp/filesystem/blob/770a8cb04caca920af8029d7aad7208bc0592743/src/Finder.php#L577-L587
crysalead/net
src/Http/Response.php
Response.negotiate
public function negotiate($request) { $media = $this->_classes['media']; foreach ($request->accepts() as $mime => $value) { if ($format = $media::suitable($request, $mime)) { $this->format($format); return; } } $mimes = join('",...
php
public function negotiate($request) { $media = $this->_classes['media']; foreach ($request->accepts() as $mime => $value) { if ($format = $media::suitable($request, $mime)) { $this->format($format); return; } } $mimes = join('",...
[ "public", "function", "negotiate", "(", "$", "request", ")", "{", "$", "media", "=", "$", "this", "->", "_classes", "[", "'media'", "]", ";", "foreach", "(", "$", "request", "->", "accepts", "(", ")", "as", "$", "mime", "=>", "$", "value", ")", "{"...
Performs a format negotiation from a `Request` object, by iterating over the accepted content types in sequence, from most preferred to least. @param object $request A request instance .
[ "Performs", "a", "format", "negotiation", "from", "a", "Request", "object", "by", "iterating", "over", "the", "accepted", "content", "types", "in", "sequence", "from", "most", "preferred", "to", "least", "." ]
train
https://github.com/crysalead/net/blob/4d75abead39e954529b56cbffa3841a9cd3044bb/src/Http/Response.php#L110-L121
crysalead/net
src/Http/Response.php
Response.status
public function status($status = []) { if (func_num_args() === 0) { return $this->_status; } $message = null; if (is_array($status)) { $code = isset($status[0]) ? (integer) $status[0] : 200; $message = isset($status[1]) ? (string) $status[1] : nul...
php
public function status($status = []) { if (func_num_args() === 0) { return $this->_status; } $message = null; if (is_array($status)) { $code = isset($status[0]) ? (integer) $status[0] : 200; $message = isset($status[1]) ? (string) $status[1] : nul...
[ "public", "function", "status", "(", "$", "status", "=", "[", "]", ")", "{", "if", "(", "func_num_args", "(", ")", "===", "0", ")", "{", "return", "$", "this", "->", "_status", ";", "}", "$", "message", "=", "null", ";", "if", "(", "is_array", "(...
Sets/gets the status for the response. @param string $key Optional. Set to 'code' or 'message' to return just the code or message of the status, otherwise returns the full status header. @param string $status The code or message of the status you wish to set. @return string|self Returns the full...
[ "Sets", "/", "gets", "the", "status", "for", "the", "response", "." ]
train
https://github.com/crysalead/net/blob/4d75abead39e954529b56cbffa3841a9cd3044bb/src/Http/Response.php#L142-L160
crysalead/net
src/Http/Response.php
Response.digest
public function digest() { $headers = $this->headers(); if (!isset($headers['WWW-Authenticate'])) { return []; } $auth = $this->_classes['auth']; return $auth::decode($headers['WWW-Authenticate']); }
php
public function digest() { $headers = $this->headers(); if (!isset($headers['WWW-Authenticate'])) { return []; } $auth = $this->_classes['auth']; return $auth::decode($headers['WWW-Authenticate']); }
[ "public", "function", "digest", "(", ")", "{", "$", "headers", "=", "$", "this", "->", "headers", "(", ")", ";", "if", "(", "!", "isset", "(", "$", "headers", "[", "'WWW-Authenticate'", "]", ")", ")", "{", "return", "[", "]", ";", "}", "$", "auth...
Looks at the WWW-Authenticate. Will return array of key/values if digest. @param string $header value of WWW-Authenticate @return array
[ "Looks", "at", "the", "WWW", "-", "Authenticate", ".", "Will", "return", "array", "of", "key", "/", "values", "if", "digest", "." ]
train
https://github.com/crysalead/net/blob/4d75abead39e954529b56cbffa3841a9cd3044bb/src/Http/Response.php#L198-L206
crysalead/net
src/Http/Response.php
Response.cache
public function cache($expires) { if ($expires === false) { $data = [ 'Expires: Mon, 26 Jul 1997 05:00:00 GMT', 'Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0', 'Pragma: no-cache' ]; } ...
php
public function cache($expires) { if ($expires === false) { $data = [ 'Expires: Mon, 26 Jul 1997 05:00:00 GMT', 'Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0', 'Pragma: no-cache' ]; } ...
[ "public", "function", "cache", "(", "$", "expires", ")", "{", "if", "(", "$", "expires", "===", "false", ")", "{", "$", "data", "=", "[", "'Expires: Mon, 26 Jul 1997 05:00:00 GMT'", ",", "'Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0, max-...
Controls how or whether the client browser and web proxies should cache this response. @param mixed $expires This can be a Unix timestamp indicating when the page expires, or a string indicating the relative time offset that a page should expire, i.e. `"+5 hours". Finally, `$expires` can be set to `false` to complete...
[ "Controls", "how", "or", "whether", "the", "client", "browser", "and", "web", "proxies", "should", "cache", "this", "response", "." ]
train
https://github.com/crysalead/net/blob/4d75abead39e954529b56cbffa3841a9cd3044bb/src/Http/Response.php#L216-L236
crysalead/net
src/Http/Response.php
Response.dump
public function dump() { $this->_setContentLength(); header($this->line()); $headers = $this->headers(); foreach ($headers as $header) { header($header->to('header')); } if ($headers['Transfer-Encoding']->value() === 'chunked') { return; ...
php
public function dump() { $this->_setContentLength(); header($this->line()); $headers = $this->headers(); foreach ($headers as $header) { header($header->to('header')); } if ($headers['Transfer-Encoding']->value() === 'chunked') { return; ...
[ "public", "function", "dump", "(", ")", "{", "$", "this", "->", "_setContentLength", "(", ")", ";", "header", "(", "$", "this", "->", "line", "(", ")", ")", ";", "$", "headers", "=", "$", "this", "->", "headers", "(", ")", ";", "foreach", "(", "$...
Renders a response by writing headers and output. @see https://bugs.php.net/bug.php?id=18029
[ "Renders", "a", "response", "by", "writing", "headers", "and", "output", "." ]
train
https://github.com/crysalead/net/blob/4d75abead39e954529b56cbffa3841a9cd3044bb/src/Http/Response.php#L243-L263
crysalead/net
src/Http/Response.php
Response.push
public function push($data, $atomic = true, $options = []) { $headers = $this->headers(); if ($headers['Transfer-Encoding']->value() !== 'chunked') { throw new NetException("Pushing is only supported in chunked transfer."); } $defaults = [ 'cast' => true, ...
php
public function push($data, $atomic = true, $options = []) { $headers = $this->headers(); if ($headers['Transfer-Encoding']->value() !== 'chunked') { throw new NetException("Pushing is only supported in chunked transfer."); } $defaults = [ 'cast' => true, ...
[ "public", "function", "push", "(", "$", "data", ",", "$", "atomic", "=", "true", ",", "$", "options", "=", "[", "]", ")", "{", "$", "headers", "=", "$", "this", "->", "headers", "(", ")", ";", "if", "(", "$", "headers", "[", "'Transfer-Encoding'", ...
Push additionnal data to a chunked response. @param mixed $data The formated data. If the passed data is a stream it'll be closed. @param boolean $atomic Indicates if the $data can be chunked or must be send as a whole chunk.
[ "Push", "additionnal", "data", "to", "a", "chunked", "response", "." ]
train
https://github.com/crysalead/net/blob/4d75abead39e954529b56cbffa3841a9cd3044bb/src/Http/Response.php#L271-L320
crysalead/net
src/Http/Response.php
Response.applyCookies
public function applyCookies($cookies) { $headers = $this->headers(); foreach ($cookies as $cookie) { $headers['Set-Cookie'][] = $cookie->toString(); } return $this; }
php
public function applyCookies($cookies) { $headers = $this->headers(); foreach ($cookies as $cookie) { $headers['Set-Cookie'][] = $cookie->toString(); } return $this; }
[ "public", "function", "applyCookies", "(", "$", "cookies", ")", "{", "$", "headers", "=", "$", "this", "->", "headers", "(", ")", ";", "foreach", "(", "$", "cookies", "as", "$", "cookie", ")", "{", "$", "headers", "[", "'Set-Cookie'", "]", "[", "]", ...
Set the Set-Cookie header @param array $cookies The cookies. @return self
[ "Set", "the", "Set", "-", "Cookie", "header" ]
train
https://github.com/crysalead/net/blob/4d75abead39e954529b56cbffa3841a9cd3044bb/src/Http/Response.php#L340-L348
crysalead/net
src/Http/Response.php
Response.cookies
public function cookies($request) { $headers = $response->headers(); if (!isset($headers['Set-Cookie'])) { return []; } $setCookies = []; foreach ($headers['Set-Cookie'] as $setCookieHeader) { $setCookie = Cookie::fromString($setCookieHeader); ...
php
public function cookies($request) { $headers = $response->headers(); if (!isset($headers['Set-Cookie'])) { return []; } $setCookies = []; foreach ($headers['Set-Cookie'] as $setCookieHeader) { $setCookie = Cookie::fromString($setCookieHeader); ...
[ "public", "function", "cookies", "(", "$", "request", ")", "{", "$", "headers", "=", "$", "response", "->", "headers", "(", ")", ";", "if", "(", "!", "isset", "(", "$", "headers", "[", "'Set-Cookie'", "]", ")", ")", "{", "return", "[", "]", ";", ...
Extract cookies. @return array The cookies array.
[ "Extract", "cookies", "." ]
train
https://github.com/crysalead/net/blob/4d75abead39e954529b56cbffa3841a9cd3044bb/src/Http/Response.php#L355-L373
crysalead/net
src/Http/Response.php
Response.redirect
public function redirect($location, $status = 302) { if (!$location) { return; } $this->status($status); $headers = $this->headers(); $headers['Location'] = $location; return $this; }
php
public function redirect($location, $status = 302) { if (!$location) { return; } $this->status($status); $headers = $this->headers(); $headers['Location'] = $location; return $this; }
[ "public", "function", "redirect", "(", "$", "location", ",", "$", "status", "=", "302", ")", "{", "if", "(", "!", "$", "location", ")", "{", "return", ";", "}", "$", "this", "->", "status", "(", "$", "status", ")", ";", "$", "headers", "=", "$", ...
Set a redirect location. @param string $location The redirect location. @param integer $status The redirect HTTP status.
[ "Set", "a", "redirect", "location", "." ]
train
https://github.com/crysalead/net/blob/4d75abead39e954529b56cbffa3841a9cd3044bb/src/Http/Response.php#L381-L390
crysalead/net
src/Http/Response.php
Response.export
public function export($options = []) { $this->_setContentLength(); return [ 'status' => $this->status(), 'version' => $this->version(), 'headers' => $this->headers(), 'body' => $this->stream() ]; }
php
public function export($options = []) { $this->_setContentLength(); return [ 'status' => $this->status(), 'version' => $this->version(), 'headers' => $this->headers(), 'body' => $this->stream() ]; }
[ "public", "function", "export", "(", "$", "options", "=", "[", "]", ")", "{", "$", "this", "->", "_setContentLength", "(", ")", ";", "return", "[", "'status'", "=>", "$", "this", "->", "status", "(", ")", ",", "'version'", "=>", "$", "this", "->", ...
Exports a `Response` instance to an array. @param array $options Options. @return array The export array.
[ "Exports", "a", "Response", "instance", "to", "an", "array", "." ]
train
https://github.com/crysalead/net/blob/4d75abead39e954529b56cbffa3841a9cd3044bb/src/Http/Response.php#L398-L407
crysalead/net
src/Http/Response.php
Response.parse
public static function parse($message, $options = []) { $parts = explode("\r\n\r\n", $message, 2); if (count($parts) < 2) { throw new NetException("The CRLFCRLF separator between headers and body is missing."); } $response = new static($options + ['format' => null]); ...
php
public static function parse($message, $options = []) { $parts = explode("\r\n\r\n", $message, 2); if (count($parts) < 2) { throw new NetException("The CRLFCRLF separator between headers and body is missing."); } $response = new static($options + ['format' => null]); ...
[ "public", "static", "function", "parse", "(", "$", "message", ",", "$", "options", "=", "[", "]", ")", "{", "$", "parts", "=", "explode", "(", "\"\\r\\n\\r\\n\"", ",", "$", "message", ",", "2", ")", ";", "if", "(", "count", "(", "$", "parts", ")", ...
Creates a response instance from an entire HTTP message including HTTP status headers and body. @param string $message The full HTTP message. @param string $options Additionnal options. @return object Returns a request instance.
[ "Creates", "a", "response", "instance", "from", "an", "entire", "HTTP", "message", "including", "HTTP", "status", "headers", "and", "body", "." ]
train
https://github.com/crysalead/net/blob/4d75abead39e954529b56cbffa3841a9cd3044bb/src/Http/Response.php#L416-L452
crysalead/net
src/Mime/Mime.php
Mime.encode
public static function encode($body, $encoding, $wrapWidth = 76, $le = "\r\n", $cut = false) { $encoding = strtolower($encoding); switch ($encoding) { case 'quoted-printable': $body = quoted_printable_encode($body); return $wrapWidth ? rtrim(chunk_split($b...
php
public static function encode($body, $encoding, $wrapWidth = 76, $le = "\r\n", $cut = false) { $encoding = strtolower($encoding); switch ($encoding) { case 'quoted-printable': $body = quoted_printable_encode($body); return $wrapWidth ? rtrim(chunk_split($b...
[ "public", "static", "function", "encode", "(", "$", "body", ",", "$", "encoding", ",", "$", "wrapWidth", "=", "76", ",", "$", "le", "=", "\"\\r\\n\"", ",", "$", "cut", "=", "false", ")", "{", "$", "encoding", "=", "strtolower", "(", "$", "encoding", ...
Encoding method. Note: Not relying on `stream_filter_append()` since not stable. @param string $body The message to encode. @param string $encoding The encoding. @param string $wrapWidth The wrap width. @param string $le The wrap width line ending. @return string
[ "Encoding", "method", "." ]
train
https://github.com/crysalead/net/blob/4d75abead39e954529b56cbffa3841a9cd3044bb/src/Mime/Mime.php#L54-L79
crysalead/net
src/Mime/Mime.php
Mime.encodeEmail
public static function encodeEmail($email) { if (($pos = strpos($email, '@')) === false) { return; } if (!preg_match('~[\x80-\xFF]~', $email)) { return $email; } $domain = substr($email, ++$pos); return substr($email, 0, $pos) . idn_to_ascii($d...
php
public static function encodeEmail($email) { if (($pos = strpos($email, '@')) === false) { return; } if (!preg_match('~[\x80-\xFF]~', $email)) { return $email; } $domain = substr($email, ++$pos); return substr($email, 0, $pos) . idn_to_ascii($d...
[ "public", "static", "function", "encodeEmail", "(", "$", "email", ")", "{", "if", "(", "(", "$", "pos", "=", "strpos", "(", "$", "email", ",", "'@'", ")", ")", "===", "false", ")", "{", "return", ";", "}", "if", "(", "!", "preg_match", "(", "'~[\...
Punycode email address to its ASCII form, also known as punycode. @param string $email The email address to encode @return string|null The encoded address in ASCII form or `null` on error.
[ "Punycode", "email", "address", "to", "its", "ASCII", "form", "also", "known", "as", "punycode", "." ]
train
https://github.com/crysalead/net/blob/4d75abead39e954529b56cbffa3841a9cd3044bb/src/Mime/Mime.php#L87-L97
crysalead/net
src/Mime/Mime.php
Mime.encodeValue
public static function encodeValue($value, $wrapWidth = 998, $folding = "\r\n ") { if (!preg_match('~[^\x00-\x7F]~', $value)) { $encoding = '7bit'; } elseif (preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $value) > (strlen($value) / 3)) { $encoding = 'base64'; ...
php
public static function encodeValue($value, $wrapWidth = 998, $folding = "\r\n ") { if (!preg_match('~[^\x00-\x7F]~', $value)) { $encoding = '7bit'; } elseif (preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $value) > (strlen($value) / 3)) { $encoding = 'base64'; ...
[ "public", "static", "function", "encodeValue", "(", "$", "value", ",", "$", "wrapWidth", "=", "998", ",", "$", "folding", "=", "\"\\r\\n \"", ")", "{", "if", "(", "!", "preg_match", "(", "'~[^\\x00-\\x7F]~'", ",", "$", "value", ")", ")", "{", "$", "enc...
MIME-encode a value to its mots suitable format @param string $value The value to encode. @return string Returns the encoded value.
[ "MIME", "-", "encode", "a", "value", "to", "its", "mots", "suitable", "format" ]
train
https://github.com/crysalead/net/blob/4d75abead39e954529b56cbffa3841a9cd3044bb/src/Mime/Mime.php#L105-L130
wshafer/assetmanager-core
src/Resolver/MapResolver.php
MapResolver.resolve
public function resolve($name) { if (!isset($this->map[$name])) { return null; } $asset = $this->resolveFile($this->map[$name]); if (!$asset) { return null; } $asset->mimetype = $this->getMimeResolver()->getMimeType($name); return $...
php
public function resolve($name) { if (!isset($this->map[$name])) { return null; } $asset = $this->resolveFile($this->map[$name]); if (!$asset) { return null; } $asset->mimetype = $this->getMimeResolver()->getMimeType($name); return $...
[ "public", "function", "resolve", "(", "$", "name", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "map", "[", "$", "name", "]", ")", ")", "{", "return", "null", ";", "}", "$", "asset", "=", "$", "this", "->", "resolveFile", "(", "$"...
{@inheritDoc}
[ "{" ]
train
https://github.com/wshafer/assetmanager-core/blob/b1bf9b3ab3b28f847fbe3f57d6c2c32b98c1431d/src/Resolver/MapResolver.php#L69-L84
incraigulous/contentful-sdk
src/ClientBase.php
ClientBase.getEndpoint
function getEndpoint() { $endpoint = $this->endpointBase; if ($this->spaceId) { $endpoint .= '/' . $this->spaceId; } return $endpoint; }
php
function getEndpoint() { $endpoint = $this->endpointBase; if ($this->spaceId) { $endpoint .= '/' . $this->spaceId; } return $endpoint; }
[ "function", "getEndpoint", "(", ")", "{", "$", "endpoint", "=", "$", "this", "->", "endpointBase", ";", "if", "(", "$", "this", "->", "spaceId", ")", "{", "$", "endpoint", ".=", "'/'", ".", "$", "this", "->", "spaceId", ";", "}", "return", "$", "en...
Get the endpoint. @return string
[ "Get", "the", "endpoint", "." ]
train
https://github.com/incraigulous/contentful-sdk/blob/29399b11b0e085a06ea5976661378c379fe5a731/src/ClientBase.php#L48-L54
incraigulous/contentful-sdk
src/ClientBase.php
ClientBase.get
function get($resource, $query = array(), $headers = array()) { $url = $this->build_url($resource, $query); $key = $this->buildCacheKey('get', $resource, $url, $headers, $query); if (($this->cacher) && ($this->cacher->has($key))) return $this->cacher->get($key); $result = $this->client->...
php
function get($resource, $query = array(), $headers = array()) { $url = $this->build_url($resource, $query); $key = $this->buildCacheKey('get', $resource, $url, $headers, $query); if (($this->cacher) && ($this->cacher->has($key))) return $this->cacher->get($key); $result = $this->client->...
[ "function", "get", "(", "$", "resource", ",", "$", "query", "=", "array", "(", ")", ",", "$", "headers", "=", "array", "(", ")", ")", "{", "$", "url", "=", "$", "this", "->", "build_url", "(", "$", "resource", ",", "$", "query", ")", ";", "$", ...
Make a get request. @param $resource @param array $query @param array $headers @return mixed
[ "Make", "a", "get", "request", "." ]
train
https://github.com/incraigulous/contentful-sdk/blob/29399b11b0e085a06ea5976661378c379fe5a731/src/ClientBase.php#L63-L74
incraigulous/contentful-sdk
src/ClientBase.php
ClientBase.build_url
function build_url($resource, array $query = array()) { $url = $this->getEndpoint(); if ($resource && $this->spaceId) $url .= '/'; if ($resource) $url .= $resource; if (!empty($query)) $url .= '?' . http_build_query($query); return $url; }
php
function build_url($resource, array $query = array()) { $url = $this->getEndpoint(); if ($resource && $this->spaceId) $url .= '/'; if ($resource) $url .= $resource; if (!empty($query)) $url .= '?' . http_build_query($query); return $url; }
[ "function", "build_url", "(", "$", "resource", ",", "array", "$", "query", "=", "array", "(", ")", ")", "{", "$", "url", "=", "$", "this", "->", "getEndpoint", "(", ")", ";", "if", "(", "$", "resource", "&&", "$", "this", "->", "spaceId", ")", "$...
Build the query URL. @param $resource @param $query @return string
[ "Build", "the", "query", "URL", "." ]
train
https://github.com/incraigulous/contentful-sdk/blob/29399b11b0e085a06ea5976661378c379fe5a731/src/ClientBase.php#L82-L88
incraigulous/contentful-sdk
src/ClientBase.php
ClientBase.buildCacheKey
function buildCacheKey($method, $resource, $url, $headers = array(), $query = array()) { return md5($method . $resource . $url . json_encode($query) . json_encode($headers)); }
php
function buildCacheKey($method, $resource, $url, $headers = array(), $query = array()) { return md5($method . $resource . $url . json_encode($query) . json_encode($headers)); }
[ "function", "buildCacheKey", "(", "$", "method", ",", "$", "resource", ",", "$", "url", ",", "$", "headers", "=", "array", "(", ")", ",", "$", "query", "=", "array", "(", ")", ")", "{", "return", "md5", "(", "$", "method", ".", "$", "resource", "...
Return a unique key for the query. @param $method @param $resource @param $url @param array $query @param array $headers @return string
[ "Return", "a", "unique", "key", "for", "the", "query", "." ]
train
https://github.com/incraigulous/contentful-sdk/blob/29399b11b0e085a06ea5976661378c379fe5a731/src/ClientBase.php#L99-L101
DevGroup-ru/yii2-data-structure-tools
src/models/PropertyGroup.php
PropertyGroup.afterSave
public function afterSave($insert, $changedAttributes) { parent::afterSave($insert, $changedAttributes); $this->invalidatePropertyIds(); if (array_key_exists('is_auto_added', $changedAttributes) && $this->is_auto_added === true) { $this->autoAddToObjects(); } }
php
public function afterSave($insert, $changedAttributes) { parent::afterSave($insert, $changedAttributes); $this->invalidatePropertyIds(); if (array_key_exists('is_auto_added', $changedAttributes) && $this->is_auto_added === true) { $this->autoAddToObjects(); } }
[ "public", "function", "afterSave", "(", "$", "insert", ",", "$", "changedAttributes", ")", "{", "parent", "::", "afterSave", "(", "$", "insert", ",", "$", "changedAttributes", ")", ";", "$", "this", "->", "invalidatePropertyIds", "(", ")", ";", "if", "(", ...
Performs afterSave event and makes other stuff: - invalidates needed cache - automatically adds bindings if this group is_auto_added @param bool $insert @param array $changedAttributes
[ "Performs", "afterSave", "event", "and", "makes", "other", "stuff", ":", "-", "invalidates", "needed", "cache", "-", "automatically", "adds", "bindings", "if", "this", "group", "is_auto_added" ]
train
https://github.com/DevGroup-ru/yii2-data-structure-tools/blob/a5b24d7c0b24d4b0d58cacd91ec7fd876e979097/src/models/PropertyGroup.php#L145-L154
DevGroup-ru/yii2-data-structure-tools
src/models/PropertyGroup.php
PropertyGroup.autoAddToObjects
public function autoAddToObjects() { /** @var \yii\db\ActiveRecord|\DevGroup\DataStructure\traits\PropertiesTrait $modelClassName */ $modelClassName = PropertiesHelper::classNameForApplicablePropertyModelId($this->applicable_property_model_id); $modelIdsWithoutGroup = $modelClassName::find()...
php
public function autoAddToObjects() { /** @var \yii\db\ActiveRecord|\DevGroup\DataStructure\traits\PropertiesTrait $modelClassName */ $modelClassName = PropertiesHelper::classNameForApplicablePropertyModelId($this->applicable_property_model_id); $modelIdsWithoutGroup = $modelClassName::find()...
[ "public", "function", "autoAddToObjects", "(", ")", "{", "/** @var \\yii\\db\\ActiveRecord|\\DevGroup\\DataStructure\\traits\\PropertiesTrait $modelClassName */", "$", "modelClassName", "=", "PropertiesHelper", "::", "classNameForApplicablePropertyModelId", "(", "$", "this", "->", ...
Finds new applicable models and binds this group to them @throws \yii\db\Exception Database exception is thrown on error
[ "Finds", "new", "applicable", "models", "and", "binds", "this", "group", "to", "them" ]
train
https://github.com/DevGroup-ru/yii2-data-structure-tools/blob/a5b24d7c0b24d4b0d58cacd91ec7fd876e979097/src/models/PropertyGroup.php#L185-L217
DevGroup-ru/yii2-data-structure-tools
src/models/PropertyGroup.php
PropertyGroup.propertyIdsForGroup
public static function propertyIdsForGroup($propertyGroupId) { if (isset(static::$groupIdToPropertyIds[$propertyGroupId])) { return static::$groupIdToPropertyIds[$propertyGroupId]; } $ids = Yii::$app->cache->lazy( function () use ($propertyGroupId) { $...
php
public static function propertyIdsForGroup($propertyGroupId) { if (isset(static::$groupIdToPropertyIds[$propertyGroupId])) { return static::$groupIdToPropertyIds[$propertyGroupId]; } $ids = Yii::$app->cache->lazy( function () use ($propertyGroupId) { $...
[ "public", "static", "function", "propertyIdsForGroup", "(", "$", "propertyGroupId", ")", "{", "if", "(", "isset", "(", "static", "::", "$", "groupIdToPropertyIds", "[", "$", "propertyGroupId", "]", ")", ")", "{", "return", "static", "::", "$", "groupIdToProper...
Returns property ids sequence array for $property_group_id, uses cache @param int $propertyGroupId @return int[] Array of property ids for group
[ "Returns", "property", "ids", "sequence", "array", "for", "$property_group_id", "uses", "cache" ]
train
https://github.com/DevGroup-ru/yii2-data-structure-tools/blob/a5b24d7c0b24d4b0d58cacd91ec7fd876e979097/src/models/PropertyGroup.php#L226-L255
DevGroup-ru/yii2-data-structure-tools
src/models/PropertyGroup.php
PropertyGroup.getAutoAddedGroupsIds
public static function getAutoAddedGroupsIds($applicablePropertyModelId) { return Yii::$app->cache->lazy( function () use ($applicablePropertyModelId) { return array_map( function ($item) { return intval($item); }, ...
php
public static function getAutoAddedGroupsIds($applicablePropertyModelId) { return Yii::$app->cache->lazy( function () use ($applicablePropertyModelId) { return array_map( function ($item) { return intval($item); }, ...
[ "public", "static", "function", "getAutoAddedGroupsIds", "(", "$", "applicablePropertyModelId", ")", "{", "return", "Yii", "::", "$", "app", "->", "cache", "->", "lazy", "(", "function", "(", ")", "use", "(", "$", "applicablePropertyModelId", ")", "{", "return...
Returns auto-added property group ids for specified $applicablePropertyModelId @param integer $applicablePropertyModelId @return integer[]
[ "Returns", "auto", "-", "added", "property", "group", "ids", "for", "specified", "$applicablePropertyModelId" ]
train
https://github.com/DevGroup-ru/yii2-data-structure-tools/blob/a5b24d7c0b24d4b0d58cacd91ec7fd876e979097/src/models/PropertyGroup.php#L264-L282
DevGroup-ru/yii2-data-structure-tools
src/models/PropertyGroup.php
PropertyGroup.search
public function search($applicablePropertyModelId, $params, $showHidden = false) { $query = self::find() ->where([ 'applicable_property_model_id' => $applicablePropertyModelId, ]); $dataProvider = new ActiveDataProvider([ 'query' => $query, ...
php
public function search($applicablePropertyModelId, $params, $showHidden = false) { $query = self::find() ->where([ 'applicable_property_model_id' => $applicablePropertyModelId, ]); $dataProvider = new ActiveDataProvider([ 'query' => $query, ...
[ "public", "function", "search", "(", "$", "applicablePropertyModelId", ",", "$", "params", ",", "$", "showHidden", "=", "false", ")", "{", "$", "query", "=", "self", "::", "find", "(", ")", "->", "where", "(", "[", "'applicable_property_model_id'", "=>", "...
Returns ActiveDataProvider for searching PropertyGroup models @param integer $applicablePropertyModelId Applicable property model id @param array $params Array of filter params @return \yii\data\ActiveDataProvider @codeCoverageIgnore
[ "Returns", "ActiveDataProvider", "for", "searching", "PropertyGroup", "models" ]
train
https://github.com/DevGroup-ru/yii2-data-structure-tools/blob/a5b24d7c0b24d4b0d58cacd91ec7fd876e979097/src/models/PropertyGroup.php#L294-L329
markwatkinson/luminous
src/Luminous/Core/Scanners/EmbeddedWebScriptScanner.php
EmbeddedWebScriptScanner.string
public function string($str = null) { if ($str !== null) { foreach ($this->childScanners as $s) { $s->string($str); } } return parent::string($str); }
php
public function string($str = null) { if ($str !== null) { foreach ($this->childScanners as $s) { $s->string($str); } } return parent::string($str); }
[ "public", "function", "string", "(", "$", "str", "=", "null", ")", "{", "if", "(", "$", "str", "!==", "null", ")", "{", "foreach", "(", "$", "this", "->", "childScanners", "as", "$", "s", ")", "{", "$", "s", "->", "string", "(", "$", "str", ")"...
override string to hit the child scanners as well
[ "override", "string", "to", "hit", "the", "child", "scanners", "as", "well" ]
train
https://github.com/markwatkinson/luminous/blob/4adc18f414534abe986133d6d38e8e9787d32e69/src/Luminous/Core/Scanners/EmbeddedWebScriptScanner.php#L115-L123
markwatkinson/luminous
src/Luminous/Core/Scanners/EmbeddedWebScriptScanner.php
EmbeddedWebScriptScanner.dirtyExit
public function dirtyExit($tokenName) { if (!isset($this->dirtyExitRecovery[$tokenName])) { throw new Exception('No dirty exit recovery data for '. $tokenName); $this->cleanExit = true; return; } $this->exitState = $tokenName; $this->interrupt = tr...
php
public function dirtyExit($tokenName) { if (!isset($this->dirtyExitRecovery[$tokenName])) { throw new Exception('No dirty exit recovery data for '. $tokenName); $this->cleanExit = true; return; } $this->exitState = $tokenName; $this->interrupt = tr...
[ "public", "function", "dirtyExit", "(", "$", "tokenName", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "dirtyExitRecovery", "[", "$", "tokenName", "]", ")", ")", "{", "throw", "new", "Exception", "(", "'No dirty exit recovery data for '", ".", ...
@brief Sets the exit data to signify the exit is dirty and will need recovering from @param $token_name the name of the token which is being interrupted @throw Exception if no recovery data is associated with the given token.
[ "@brief", "Sets", "the", "exit", "data", "to", "signify", "the", "exit", "is", "dirty", "and", "will", "need", "recovering", "from" ]
train
https://github.com/markwatkinson/luminous/blob/4adc18f414534abe986133d6d38e8e9787d32e69/src/Luminous/Core/Scanners/EmbeddedWebScriptScanner.php#L132-L142
markwatkinson/luminous
src/Luminous/Core/Scanners/EmbeddedWebScriptScanner.php
EmbeddedWebScriptScanner.resume
public function resume() { assert(!$this->cleanExit); $this->cleanExit = true; $this->interrupt = false; if (!isset($this->dirtyExitRecovery[$this->exitState])) { throw new Exception( "Not implemented error: The scanner was interrupted mid-state (in state ...
php
public function resume() { assert(!$this->cleanExit); $this->cleanExit = true; $this->interrupt = false; if (!isset($this->dirtyExitRecovery[$this->exitState])) { throw new Exception( "Not implemented error: The scanner was interrupted mid-state (in state ...
[ "public", "function", "resume", "(", ")", "{", "assert", "(", "!", "$", "this", "->", "cleanExit", ")", ";", "$", "this", "->", "cleanExit", "=", "true", ";", "$", "this", "->", "interrupt", "=", "false", ";", "if", "(", "!", "isset", "(", "$", "...
@brief Attempts to recover from a dirty exit. This method should be called on @b every iteration of the main loop when LuminousEmbeddedWebScript::$clean_exit is @b FALSE. It will attempt to recover from an interruption which left the scanner in the middle of a token. The remainder of the token will be in Scanner::matc...
[ "@brief", "Attempts", "to", "recover", "from", "a", "dirty", "exit", "." ]
train
https://github.com/markwatkinson/luminous/blob/4adc18f414534abe986133d6d38e8e9787d32e69/src/Luminous/Core/Scanners/EmbeddedWebScriptScanner.php#L163-L181
markwatkinson/luminous
src/Luminous/Core/Scanners/EmbeddedWebScriptScanner.php
EmbeddedWebScriptScanner.serverBreak
public function serverBreak($tokenName, $match = null, $pos = null) { if (!$this->embeddedServer) { return false; } if ($match === null) { $match = $this->match(); } if ($match === null) { return false; } if (preg_match($th...
php
public function serverBreak($tokenName, $match = null, $pos = null) { if (!$this->embeddedServer) { return false; } if ($match === null) { $match = $this->match(); } if ($match === null) { return false; } if (preg_match($th...
[ "public", "function", "serverBreak", "(", "$", "tokenName", ",", "$", "match", "=", "null", ",", "$", "pos", "=", "null", ")", "{", "if", "(", "!", "$", "this", "->", "embeddedServer", ")", "{", "return", "false", ";", "}", "if", "(", "$", "match",...
@brief Checks for a server-side script inside a matched token @param $token_name The token name of the matched text @param $match The string from the last match. If this is left @c NULL then Scanner::match() is assumed to hold the match. @param $pos The position of the last match. If this is left @c NULL then Scanner:...
[ "@brief", "Checks", "for", "a", "server", "-", "side", "script", "inside", "a", "matched", "token" ]
train
https://github.com/markwatkinson/luminous/blob/4adc18f414534abe986133d6d38e8e9787d32e69/src/Luminous/Core/Scanners/EmbeddedWebScriptScanner.php#L205-L228
markwatkinson/luminous
src/Luminous/Core/Scanners/EmbeddedWebScriptScanner.php
EmbeddedWebScriptScanner.scriptBreak
public function scriptBreak($tokenName, $match = null, $pos = null) { if (!$this->embeddedHtml) { return false; } if ($match === null) { $match = $this->match(); } if ($match === null) { return false; } if (($pos_ = stripos...
php
public function scriptBreak($tokenName, $match = null, $pos = null) { if (!$this->embeddedHtml) { return false; } if ($match === null) { $match = $this->match(); } if ($match === null) { return false; } if (($pos_ = stripos...
[ "public", "function", "scriptBreak", "(", "$", "tokenName", ",", "$", "match", "=", "null", ",", "$", "pos", "=", "null", ")", "{", "if", "(", "!", "$", "this", "->", "embeddedHtml", ")", "{", "return", "false", ";", "}", "if", "(", "$", "match", ...
@brief Checks for a script terminator tag inside a matched token @param $token_name The token name of the matched text @param $match The string from the last match. If this is left @c NULL then Scanner::match() is assumed to hold the match. @param $pos The position of the last match. If this is left @c NULL then Scann...
[ "@brief", "Checks", "for", "a", "script", "terminator", "tag", "inside", "a", "matched", "token" ]
train
https://github.com/markwatkinson/luminous/blob/4adc18f414534abe986133d6d38e8e9787d32e69/src/Luminous/Core/Scanners/EmbeddedWebScriptScanner.php#L249-L271
dphn/ScContent
src/ScContent/Controller/Installation/RequirementsController.php
RequirementsController.configurationAction
public function configurationAction() { $redirect = $this->getRedirect(); $installation = $this->getInstallation(); $step = $installation->getCurrentStep(); $member = $step->getCurrentMember(); $validator = $this->getValidator(); if (! $validator...
php
public function configurationAction() { $redirect = $this->getRedirect(); $installation = $this->getInstallation(); $step = $installation->getCurrentStep(); $member = $step->getCurrentMember(); $validator = $this->getValidator(); if (! $validator...
[ "public", "function", "configurationAction", "(", ")", "{", "$", "redirect", "=", "$", "this", "->", "getRedirect", "(", ")", ";", "$", "installation", "=", "$", "this", "->", "getInstallation", "(", ")", ";", "$", "step", "=", "$", "installation", "->",...
Checks the settings in the php.ini file in accordance with the configuration of the module. If the settings are not compatible, the installation process stops and displays the information message. @return \Zend\Stdlib\ResponseInterface|\Zend\View\Model\ViewModel
[ "Checks", "the", "settings", "in", "the", "php", ".", "ini", "file", "in", "accordance", "with", "the", "configuration", "of", "the", "module", ".", "If", "the", "settings", "are", "not", "compatible", "the", "installation", "process", "stops", "and", "displ...
train
https://github.com/dphn/ScContent/blob/9dd5732490c45fd788b96cedf7b3c7adfacb30d2/src/ScContent/Controller/Installation/RequirementsController.php#L33-L89
terdia/legato-framework
src/Mail/Transport/MailGunClient.php
MailGunClient.combineTo
protected function combineTo(Swift_Mime_SimpleMessage $message) { return array_merge( (array) $message->getTo(), (array) $message->getCc(), (array) $message->getBcc() ); }
php
protected function combineTo(Swift_Mime_SimpleMessage $message) { return array_merge( (array) $message->getTo(), (array) $message->getCc(), (array) $message->getBcc() ); }
[ "protected", "function", "combineTo", "(", "Swift_Mime_SimpleMessage", "$", "message", ")", "{", "return", "array_merge", "(", "(", "array", ")", "$", "message", "->", "getTo", "(", ")", ",", "(", "array", ")", "$", "message", "->", "getCc", "(", ")", ",...
Combine all contacts for the message. @param \Swift_Mime_SimpleMessage $message @return array
[ "Combine", "all", "contacts", "for", "the", "message", "." ]
train
https://github.com/terdia/legato-framework/blob/44057c1c3c6f3e9643e9fade51bd417860fafda8/src/Mail/Transport/MailGunClient.php#L84-L89
terdia/legato-framework
src/Mail/Transport/MailGunClient.php
MailGunClient.prepareTo
protected function prepareTo(Swift_Mime_SimpleMessage $message) { $to = array_map(function ($name, $address) { return $name ? $name." <{$address}>" : $address; }, $this->combineTo($message), array_keys($this->combineTo($message))); return implode(',', $to); }
php
protected function prepareTo(Swift_Mime_SimpleMessage $message) { $to = array_map(function ($name, $address) { return $name ? $name." <{$address}>" : $address; }, $this->combineTo($message), array_keys($this->combineTo($message))); return implode(',', $to); }
[ "protected", "function", "prepareTo", "(", "Swift_Mime_SimpleMessage", "$", "message", ")", "{", "$", "to", "=", "array_map", "(", "function", "(", "$", "name", ",", "$", "address", ")", "{", "return", "$", "name", "?", "$", "name", ".", "\" <{$address}>\"...
Format the to addresses to match Mailgun message.mime format. @param Swift_Mime_SimpleMessage $message @return string
[ "Format", "the", "to", "addresses", "to", "match", "Mailgun", "message", ".", "mime", "format", "." ]
train
https://github.com/terdia/legato-framework/blob/44057c1c3c6f3e9643e9fade51bd417860fafda8/src/Mail/Transport/MailGunClient.php#L98-L105
pantera-digital/yii2-seo
migrations/m181008_052306_add_support_unicode.php
m181008_052306_add_support_unicode.safeDown
public function safeDown() { echo "m181008_052306_add_support_unicode cannot be reverted.\n"; $this->execute('ALTER TABLE ' . Seo::tableName() . ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;'); $this->execute('ALTER TABLE ' . SeoPresets::tableName() . ' CONVERT TO CHARACTER SET ut...
php
public function safeDown() { echo "m181008_052306_add_support_unicode cannot be reverted.\n"; $this->execute('ALTER TABLE ' . Seo::tableName() . ' CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;'); $this->execute('ALTER TABLE ' . SeoPresets::tableName() . ' CONVERT TO CHARACTER SET ut...
[ "public", "function", "safeDown", "(", ")", "{", "echo", "\"m181008_052306_add_support_unicode cannot be reverted.\\n\"", ";", "$", "this", "->", "execute", "(", "'ALTER TABLE '", ".", "Seo", "::", "tableName", "(", ")", ".", "' CONVERT TO CHARACTER SET utf8 COLLATE utf8_...
{@inheritdoc}
[ "{" ]
train
https://github.com/pantera-digital/yii2-seo/blob/7673224ef601bfbccc57c96e7413ceb43d8332b2/migrations/m181008_052306_add_support_unicode.php#L24-L30
terdia/legato-framework
src/Security/CSRFProtection.php
CSRFProtection.extractToken
protected function extractToken() { if ($this->request->input('token') === false) { if (!$this->request->getHeader('X-JS-CLIENTS-TOKEN')) { return 'token'; } return $this->request->getHeader('X-JS-CLIENTS-TOKEN'); } return $this->request-...
php
protected function extractToken() { if ($this->request->input('token') === false) { if (!$this->request->getHeader('X-JS-CLIENTS-TOKEN')) { return 'token'; } return $this->request->getHeader('X-JS-CLIENTS-TOKEN'); } return $this->request-...
[ "protected", "function", "extractToken", "(", ")", "{", "if", "(", "$", "this", "->", "request", "->", "input", "(", "'token'", ")", "===", "false", ")", "{", "if", "(", "!", "$", "this", "->", "request", "->", "getHeader", "(", "'X-JS-CLIENTS-TOKEN'", ...
extract token from form or JavaScript Clients like Axios, Ajax, JQuery. @return bool|string|string[]
[ "extract", "token", "from", "form", "or", "JavaScript", "Clients", "like", "Axios", "Ajax", "JQuery", "." ]
train
https://github.com/terdia/legato-framework/blob/44057c1c3c6f3e9643e9fade51bd417860fafda8/src/Security/CSRFProtection.php#L77-L88
terdia/legato-framework
src/Session/Session.php
Session.getInstance
public static function getInstance() { if (!static::$instance instanceof self) { static::$instance = $session = new self(); if (!$session->isStarted()) { $session->start(); } } return static::$instance; }
php
public static function getInstance() { if (!static::$instance instanceof self) { static::$instance = $session = new self(); if (!$session->isStarted()) { $session->start(); } } return static::$instance; }
[ "public", "static", "function", "getInstance", "(", ")", "{", "if", "(", "!", "static", "::", "$", "instance", "instanceof", "self", ")", "{", "static", "::", "$", "instance", "=", "$", "session", "=", "new", "self", "(", ")", ";", "if", "(", "!", ...
Session singleton. @return mixed
[ "Session", "singleton", "." ]
train
https://github.com/terdia/legato-framework/blob/44057c1c3c6f3e9643e9fade51bd417860fafda8/src/Session/Session.php#L26-L36
terdia/legato-framework
src/Session/Session.php
Session.createFlashMessage
public function createFlashMessage($key, $value) { $session = static::getInstance(); $session->getFlashBag()->add($key, $value); }
php
public function createFlashMessage($key, $value) { $session = static::getInstance(); $session->getFlashBag()->add($key, $value); }
[ "public", "function", "createFlashMessage", "(", "$", "key", ",", "$", "value", ")", "{", "$", "session", "=", "static", "::", "getInstance", "(", ")", ";", "$", "session", "->", "getFlashBag", "(", ")", "->", "add", "(", "$", "key", ",", "$", "value...
Add flash message. @param $key @param $value
[ "Add", "flash", "message", "." ]
train
https://github.com/terdia/legato-framework/blob/44057c1c3c6f3e9643e9fade51bd417860fafda8/src/Session/Session.php#L44-L48
terdia/legato-framework
src/Session/Session.php
Session.getFlashMessage
public function getFlashMessage($key) { $session = static::getInstance(); foreach ($session->getFlashBag()->get($key, []) as $message) { return $message ?: null; } return ''; }
php
public function getFlashMessage($key) { $session = static::getInstance(); foreach ($session->getFlashBag()->get($key, []) as $message) { return $message ?: null; } return ''; }
[ "public", "function", "getFlashMessage", "(", "$", "key", ")", "{", "$", "session", "=", "static", "::", "getInstance", "(", ")", ";", "foreach", "(", "$", "session", "->", "getFlashBag", "(", ")", "->", "get", "(", "$", "key", ",", "[", "]", ")", ...
Get message from flash bag. @param $key @return null|string
[ "Get", "message", "from", "flash", "bag", "." ]
train
https://github.com/terdia/legato-framework/blob/44057c1c3c6f3e9643e9fade51bd417860fafda8/src/Session/Session.php#L57-L65
arckinteractive/events_api
classes/Events/API/Event.php
Event.getURL
public function getURL($start_timestamp = 0, $calendar_guid = 0) { if (!$start_timestamp) { $start_timestamp = $this->getNextOccurrence(); } $url = parent::getURL(); return elgg_http_add_url_query_elements($url, array_filter(array( 'ts' => $start_timestamp, 'calendar' => $calendar_guid, ))); }
php
public function getURL($start_timestamp = 0, $calendar_guid = 0) { if (!$start_timestamp) { $start_timestamp = $this->getNextOccurrence(); } $url = parent::getURL(); return elgg_http_add_url_query_elements($url, array_filter(array( 'ts' => $start_timestamp, 'calendar' => $calendar_guid, ))); }
[ "public", "function", "getURL", "(", "$", "start_timestamp", "=", "0", ",", "$", "calendar_guid", "=", "0", ")", "{", "if", "(", "!", "$", "start_timestamp", ")", "{", "$", "start_timestamp", "=", "$", "this", "->", "getNextOccurrence", "(", ")", ";", ...
Returns canonical URL with instance start time added as query element @param int $start_timestamp Start time of the instance @param int $calendar_guid GUID of the calendar in context @return string
[ "Returns", "canonical", "URL", "with", "instance", "start", "time", "added", "as", "query", "element" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Event.php#L61-L70
arckinteractive/events_api
classes/Events/API/Event.php
Event.getCalendars
public function getCalendars($params = array(), $public = false) { $defaults = array( 'type' => 'object', 'subtype' => 'calendar', 'relationship' => Calendar::EVENT_CALENDAR_RELATIONSHIP, 'relationship_guid' => $this->guid, 'limit' => false ); $options = array_merge($defaults, $params); if ($pu...
php
public function getCalendars($params = array(), $public = false) { $defaults = array( 'type' => 'object', 'subtype' => 'calendar', 'relationship' => Calendar::EVENT_CALENDAR_RELATIONSHIP, 'relationship_guid' => $this->guid, 'limit' => false ); $options = array_merge($defaults, $params); if ($pu...
[ "public", "function", "getCalendars", "(", "$", "params", "=", "array", "(", ")", ",", "$", "public", "=", "false", ")", "{", "$", "defaults", "=", "array", "(", "'type'", "=>", "'object'", ",", "'subtype'", "=>", "'calendar'", ",", "'relationship'", "=>...
Get all calendars this event is on @param array custom parameters to override the default egef @param bool $public - limit to only personal public calendars?
[ "Get", "all", "calendars", "this", "event", "is", "on" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Event.php#L78-L101
arckinteractive/events_api
classes/Events/API/Event.php
Event.move
public function move($params) { //update the event $this->all_day = elgg_extract('all_day', $params, false); $this->start_timestamp = $params['new_start_timestamp']; $this->end_timestamp = $params['new_end_timestamp']; $this->start_date = $params['new_start_date']; $this->end_date = $params['new_end_date'];...
php
public function move($params) { //update the event $this->all_day = elgg_extract('all_day', $params, false); $this->start_timestamp = $params['new_start_timestamp']; $this->end_timestamp = $params['new_end_timestamp']; $this->start_date = $params['new_start_date']; $this->end_date = $params['new_end_date'];...
[ "public", "function", "move", "(", "$", "params", ")", "{", "//update the event", "$", "this", "->", "all_day", "=", "elgg_extract", "(", "'all_day'", ",", "$", "params", ",", "false", ")", ";", "$", "this", "->", "start_timestamp", "=", "$", "params", "...
Perform a move action with calculated parameters @param array $params New event parameters @return boolean
[ "Perform", "a", "move", "action", "with", "calculated", "parameters" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Event.php#L109-L128
arckinteractive/events_api
classes/Events/API/Event.php
Event.resize
public function resize($params) { //update the event $this->end_timestamp = $params['new_end_timestamp']; $this->end_date = $params['new_end_date']; $this->end_time = $params['new_end_time']; $this->end_delta = $params['new_end_timestamp'] - $this->getStartTimestamp(); // how long this is in seconds $this-...
php
public function resize($params) { //update the event $this->end_timestamp = $params['new_end_timestamp']; $this->end_date = $params['new_end_date']; $this->end_time = $params['new_end_time']; $this->end_delta = $params['new_end_timestamp'] - $this->getStartTimestamp(); // how long this is in seconds $this-...
[ "public", "function", "resize", "(", "$", "params", ")", "{", "//update the event", "$", "this", "->", "end_timestamp", "=", "$", "params", "[", "'new_end_timestamp'", "]", ";", "$", "this", "->", "end_date", "=", "$", "params", "[", "'new_end_date'", "]", ...
Extends event duration @param array $params New end parameters @return boolean
[ "Extends", "event", "duration" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Event.php#L136-L145
arckinteractive/events_api
classes/Events/API/Event.php
Event.addToCalendar
public function addToCalendar($calendar_guid) { $calendar = get_entity($calendar_guid); if ($calendar instanceof Calendar) { $calendar->addEvent($this); return true; } return false; }
php
public function addToCalendar($calendar_guid) { $calendar = get_entity($calendar_guid); if ($calendar instanceof Calendar) { $calendar->addEvent($this); return true; } return false; }
[ "public", "function", "addToCalendar", "(", "$", "calendar_guid", ")", "{", "$", "calendar", "=", "get_entity", "(", "$", "calendar_guid", ")", ";", "if", "(", "$", "calendar", "instanceof", "Calendar", ")", "{", "$", "calendar", "->", "addEvent", "(", "$"...
Adds an event to a calendar @param int $calendar_guid GUID of the calendar @return boolean
[ "Adds", "an", "event", "to", "a", "calendar" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Event.php#L153-L160
arckinteractive/events_api
classes/Events/API/Event.php
Event.removeFromCalendar
public function removeFromCalendar($calendar_guid) { $calendar = get_entity($calendar_guid); if ($calendar instanceof Calendar) { $calendar->removeEvent($this); return true; } return false; }
php
public function removeFromCalendar($calendar_guid) { $calendar = get_entity($calendar_guid); if ($calendar instanceof Calendar) { $calendar->removeEvent($this); return true; } return false; }
[ "public", "function", "removeFromCalendar", "(", "$", "calendar_guid", ")", "{", "$", "calendar", "=", "get_entity", "(", "$", "calendar_guid", ")", ";", "if", "(", "$", "calendar", "instanceof", "Calendar", ")", "{", "$", "calendar", "->", "removeEvent", "(...
Removes an event from a calendar @param int $calendar_guid GUID of the calendar @return boolean
[ "Removes", "an", "event", "from", "a", "calendar" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Event.php#L168-L176
arckinteractive/events_api
classes/Events/API/Event.php
Event.getMoveParams
public function getMoveParams($day_delta, $minute_delta, $all_day = false) { // calculate new dates $start_timestamp = $this->getStartTimestamp(); $end_timestamp = $this->getEndTimestamp(); $time_diff = $end_timestamp - $start_timestamp; $new_start_timestamp = $start_timestamp + ($day_delta * Util::SECONDS_I...
php
public function getMoveParams($day_delta, $minute_delta, $all_day = false) { // calculate new dates $start_timestamp = $this->getStartTimestamp(); $end_timestamp = $this->getEndTimestamp(); $time_diff = $end_timestamp - $start_timestamp; $new_start_timestamp = $start_timestamp + ($day_delta * Util::SECONDS_I...
[ "public", "function", "getMoveParams", "(", "$", "day_delta", ",", "$", "minute_delta", ",", "$", "all_day", "=", "false", ")", "{", "// calculate new dates", "$", "start_timestamp", "=", "$", "this", "->", "getStartTimestamp", "(", ")", ";", "$", "end_timesta...
Calculates parameters for a move action @param int $day_delta Positive or negative number of days from the original event day @param int $minute_delta Position or negative number of minutes from the origin event time @param bool $all_day All day event? @return array
[ "Calculates", "parameters", "for", "a", "move", "action" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Event.php#L235-L256
arckinteractive/events_api
classes/Events/API/Event.php
Event.getResizeParams
public function getResizeParams($day_delta = 0, $minute_delta = 0) { // calculate new dates $end_timestamp = $this->getEndTimestamp(); $new_end_timestamp = $end_timestamp + ($day_delta * Util::SECONDS_IN_A_DAY) + ($minute_delta * Util::SECONDS_IN_A_MINUTE); $params = array( 'entity' => $this, 'new_end_t...
php
public function getResizeParams($day_delta = 0, $minute_delta = 0) { // calculate new dates $end_timestamp = $this->getEndTimestamp(); $new_end_timestamp = $end_timestamp + ($day_delta * Util::SECONDS_IN_A_DAY) + ($minute_delta * Util::SECONDS_IN_A_MINUTE); $params = array( 'entity' => $this, 'new_end_t...
[ "public", "function", "getResizeParams", "(", "$", "day_delta", "=", "0", ",", "$", "minute_delta", "=", "0", ")", "{", "// calculate new dates", "$", "end_timestamp", "=", "$", "this", "->", "getEndTimestamp", "(", ")", ";", "$", "new_end_timestamp", "=", "...
Calculates parameters for the resize action @param int $day_delta Positive or negative number of days from the original event end @param int $minute_delta Positive or negative number of minutes from the original event end @return array
[ "Calculates", "parameters", "for", "the", "resize", "action" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Event.php#L265-L279
arckinteractive/events_api
classes/Events/API/Event.php
Event.getStartTimes
public function getStartTimes($starttime = 0, $endtime = 0, $tz = null) { if (!Util::isValidTimezone($tz)) { $tz = Util::getClientTimezone(); } if (!$this->isRecurring()) { return array($this->getStartTimestamp()); } $start_times = array(); $test_day = ($this->getStartTimestamp() > $starttime) ? $t...
php
public function getStartTimes($starttime = 0, $endtime = 0, $tz = null) { if (!Util::isValidTimezone($tz)) { $tz = Util::getClientTimezone(); } if (!$this->isRecurring()) { return array($this->getStartTimestamp()); } $start_times = array(); $test_day = ($this->getStartTimestamp() > $starttime) ? $t...
[ "public", "function", "getStartTimes", "(", "$", "starttime", "=", "0", ",", "$", "endtime", "=", "0", ",", "$", "tz", "=", "null", ")", "{", "if", "(", "!", "Util", "::", "isValidTimezone", "(", "$", "tz", ")", ")", "{", "$", "tz", "=", "Util", ...
Returns an array of start times for an event within a given timestamp range Note - assumes timestamp range is in increments of days @param int $startime Range start UNIX timestamp @param int $endtime Range end UNIX timestamp @return array
[ "Returns", "an", "array", "of", "start", "times", "for", "an", "event", "within", "a", "given", "timestamp", "range", "Note", "-", "assumes", "timestamp", "range", "is", "in", "increments", "of", "days" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Event.php#L289-L410
arckinteractive/events_api
classes/Events/API/Event.php
Event.calculateRepeatEndTimestamp
public function calculateRepeatEndTimestamp() { // determine when it actually stops repeating in terms of timestamp switch ($this->repeat_end_type) { case Util::REPEAT_END_ON: $repeat_end_timestamp = strtotime($this->repeat_end_on); if ($repeat_end_timestamp === false) { $repeat_end_timestamp = 0;...
php
public function calculateRepeatEndTimestamp() { // determine when it actually stops repeating in terms of timestamp switch ($this->repeat_end_type) { case Util::REPEAT_END_ON: $repeat_end_timestamp = strtotime($this->repeat_end_on); if ($repeat_end_timestamp === false) { $repeat_end_timestamp = 0;...
[ "public", "function", "calculateRepeatEndTimestamp", "(", ")", "{", "// determine when it actually stops repeating in terms of timestamp", "switch", "(", "$", "this", "->", "repeat_end_type", ")", "{", "case", "Util", "::", "REPEAT_END_ON", ":", "$", "repeat_end_timestamp",...
Calculates and returns the last timestamp for event recurrences @return int
[ "Calculates", "and", "returns", "the", "last", "timestamp", "for", "event", "recurrences" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Event.php#L416-L449
arckinteractive/events_api
classes/Events/API/Event.php
Event.calculateEndAfterTimestamp
public function calculateEndAfterTimestamp($occurrences = 1, $from_timestamp = null, $at_event_end = true) { $occurrences = (int) $occurrences; $start_timestamp = $this->getStartTimestamp(); $start_day = $start_timestamp; $test_day = ($start_timestamp > $from_timestamp) ? $start_timestamp : $from_timestamp; ...
php
public function calculateEndAfterTimestamp($occurrences = 1, $from_timestamp = null, $at_event_end = true) { $occurrences = (int) $occurrences; $start_timestamp = $this->getStartTimestamp(); $start_day = $start_timestamp; $test_day = ($start_timestamp > $from_timestamp) ? $start_timestamp : $from_timestamp; ...
[ "public", "function", "calculateEndAfterTimestamp", "(", "$", "occurrences", "=", "1", ",", "$", "from_timestamp", "=", "null", ",", "$", "at_event_end", "=", "true", ")", "{", "$", "occurrences", "=", "(", "int", ")", "$", "occurrences", ";", "$", "start_...
Calculates the end (or start) timestamp of the last event in a sequence of occurrences @param int $occurrences Max number of occurrences @param int $from_timestamp Initial time to calculate from (defaults to event start time) @param bool $at_event_end If true, will return the timestamp of the event end, otherwi...
[ "Calculates", "the", "end", "(", "or", "start", ")", "timestamp", "of", "the", "last", "event", "in", "a", "sequence", "of", "occurrences" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Event.php#L459-L563
arckinteractive/events_api
classes/Events/API/Event.php
Event.getNextOccurrence
public function getNextOccurrence($after_timestamp = null) { if ($after_timestamp === null) { $after_timestamp = time(); } $after_timestamp = (int) $after_timestamp; $next = false; if ($this->isRecurring()) { $next = $this->calculateEndAfterTimestamp(1, $after_timestamp, false); } else if ($after_...
php
public function getNextOccurrence($after_timestamp = null) { if ($after_timestamp === null) { $after_timestamp = time(); } $after_timestamp = (int) $after_timestamp; $next = false; if ($this->isRecurring()) { $next = $this->calculateEndAfterTimestamp(1, $after_timestamp, false); } else if ($after_...
[ "public", "function", "getNextOccurrence", "(", "$", "after_timestamp", "=", "null", ")", "{", "if", "(", "$", "after_timestamp", "===", "null", ")", "{", "$", "after_timestamp", "=", "time", "(", ")", ";", "}", "$", "after_timestamp", "=", "(", "int", "...
Returns the start timestamp of the next event occurence Returns false if there are no future occurrences @param int $after_timestamp Find next occurrence @return int|false
[ "Returns", "the", "start", "timestamp", "of", "the", "next", "event", "occurence", "Returns", "false", "if", "there", "are", "no", "future", "occurrences" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Event.php#L572-L591
arckinteractive/events_api
classes/Events/API/Event.php
Event.getLastOccurrence
public function getLastOccurrence($before_timestamp = null) { if ($before_timestamp === null) { $before_timestamp = time(); } $before_timestamp = (int) $before_timestamp; $prev = false; if ($this->isRecurring()) { $starttimes = $this->getStartTimes($this->getStartTimestamp(), $before_timestamp); ...
php
public function getLastOccurrence($before_timestamp = null) { if ($before_timestamp === null) { $before_timestamp = time(); } $before_timestamp = (int) $before_timestamp; $prev = false; if ($this->isRecurring()) { $starttimes = $this->getStartTimes($this->getStartTimestamp(), $before_timestamp); ...
[ "public", "function", "getLastOccurrence", "(", "$", "before_timestamp", "=", "null", ")", "{", "if", "(", "$", "before_timestamp", "===", "null", ")", "{", "$", "before_timestamp", "=", "time", "(", ")", ";", "}", "$", "before_timestamp", "=", "(", "int",...
Returns the timestamp of the previous event occurence Returns false if there are no past occurrences @param int $before_timestamp Find previous occurrence @return int|false
[ "Returns", "the", "timestamp", "of", "the", "previous", "event", "occurence", "Returns", "false", "if", "there", "are", "no", "past", "occurrences" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Event.php#L601-L625
arckinteractive/events_api
classes/Events/API/Event.php
Event.buildReminders
public function buildReminders($starttime, $endtime) { if (!$this->hasReminders()) { return true; } $starttime = sanitize_int($starttime); $endtime = sanitize_int($endtime); // first delete any existing reminders for this time period $this->removeReminders($starttime, $endtime); $reminders = e...
php
public function buildReminders($starttime, $endtime) { if (!$this->hasReminders()) { return true; } $starttime = sanitize_int($starttime); $endtime = sanitize_int($endtime); // first delete any existing reminders for this time period $this->removeReminders($starttime, $endtime); $reminders = e...
[ "public", "function", "buildReminders", "(", "$", "starttime", ",", "$", "endtime", ")", "{", "if", "(", "!", "$", "this", "->", "hasReminders", "(", ")", ")", "{", "return", "true", ";", "}", "$", "starttime", "=", "sanitize_int", "(", "$", "starttime...
Creates reminder annotations for this event @param type $starttime @param type $endtime @return boolean
[ "Creates", "reminder", "annotations", "for", "this", "event" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Event.php#L652-L682
arckinteractive/events_api
classes/Events/API/Event.php
Event.removeReminders
public function removeReminders($starttime, $endtime, $all = false) { $starttime = sanitize_int($starttime); $endtime = sanitize_int($endtime); $options = array( 'guid' => $this->guid, 'annotation_names' => array('reminder'), 'limit' => false ); if (!$all) { $options['wheres'] = "CAST(v.stri...
php
public function removeReminders($starttime, $endtime, $all = false) { $starttime = sanitize_int($starttime); $endtime = sanitize_int($endtime); $options = array( 'guid' => $this->guid, 'annotation_names' => array('reminder'), 'limit' => false ); if (!$all) { $options['wheres'] = "CAST(v.stri...
[ "public", "function", "removeReminders", "(", "$", "starttime", ",", "$", "endtime", ",", "$", "all", "=", "false", ")", "{", "$", "starttime", "=", "sanitize_int", "(", "$", "starttime", ")", ";", "$", "endtime", "=", "sanitize_int", "(", "$", "endtime"...
delete reminder annotations for a time period use the $all override to delete all reminder annotations period @param type $starttime @param type $endtime @param type $all
[ "delete", "reminder", "annotations", "for", "a", "time", "period", "use", "the", "$all", "override", "to", "delete", "all", "reminder", "annotations", "period" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Event.php#L693-L708
Laralum/Dashboard
src/DashboardServiceProvider.php
DashboardServiceProvider.boot
public function boot() { $this->loadTranslationsFrom(__DIR__.'/Translations', 'laralum_dashboard'); $this->loadViewsFrom(__DIR__.'/Views', 'laralum_dashboard'); if (!$this->app->routesAreCached()) { require __DIR__.'/Routes/web.php'; } }
php
public function boot() { $this->loadTranslationsFrom(__DIR__.'/Translations', 'laralum_dashboard'); $this->loadViewsFrom(__DIR__.'/Views', 'laralum_dashboard'); if (!$this->app->routesAreCached()) { require __DIR__.'/Routes/web.php'; } }
[ "public", "function", "boot", "(", ")", "{", "$", "this", "->", "loadTranslationsFrom", "(", "__DIR__", ".", "'/Translations'", ",", "'laralum_dashboard'", ")", ";", "$", "this", "->", "loadViewsFrom", "(", "__DIR__", ".", "'/Views'", ",", "'laralum_dashboard'",...
Bootstrap the application services. @return void
[ "Bootstrap", "the", "application", "services", "." ]
train
https://github.com/Laralum/Dashboard/blob/2acbef188bdd2d19ed1ac48e28fd74ec2df6ee4b/src/DashboardServiceProvider.php#L14-L23
dphn/ScContent
src/ScContent/Controller/Installation/InstallationController.php
InstallationController.indexAction
public function indexAction() { // To begin the step of installation, the user must click "continue". if (! $this->params()->fromRoute('process')) { return new ViewModel(); } $installation = $this->getInstallation(); $redirect = $this->getRedirect(); ...
php
public function indexAction() { // To begin the step of installation, the user must click "continue". if (! $this->params()->fromRoute('process')) { return new ViewModel(); } $installation = $this->getInstallation(); $redirect = $this->getRedirect(); ...
[ "public", "function", "indexAction", "(", ")", "{", "// To begin the step of installation, the user must click \"continue\".", "if", "(", "!", "$", "this", "->", "params", "(", ")", "->", "fromRoute", "(", "'process'", ")", ")", "{", "return", "new", "ViewModel", ...
Runs services specified in the configuration. @throws \ScContent\Exception\DomainException @return \Zend\Stdlib\ResponseInterface|\Zend\View\Model\ViewModel
[ "Runs", "services", "specified", "in", "the", "configuration", "." ]
train
https://github.com/dphn/ScContent/blob/9dd5732490c45fd788b96cedf7b3c7adfacb30d2/src/ScContent/Controller/Installation/InstallationController.php#L35-L59
marcossegovia/twitter-api-client-bundle
src/DependencyInjection/TwitterApiClientExtension.php
TwitterApiClientExtension.loadInternal
protected function loadInternal( array $mergedConfig, ContainerBuilder $container ) { /** * Setting defined parameters to services */ $container->setParameter('twitter.api_key', $mergedConfig['twitter']['api_key'] ); $container->setP...
php
protected function loadInternal( array $mergedConfig, ContainerBuilder $container ) { /** * Setting defined parameters to services */ $container->setParameter('twitter.api_key', $mergedConfig['twitter']['api_key'] ); $container->setP...
[ "protected", "function", "loadInternal", "(", "array", "$", "mergedConfig", ",", "ContainerBuilder", "$", "container", ")", "{", "/**\n * Setting defined parameters to services\n */", "$", "container", "->", "setParameter", "(", "'twitter.api_key'", ",", "$"...
Configures the passed container according to the merged configuration. @param array $mergedConfig @param ContainerBuilder $container
[ "Configures", "the", "passed", "container", "according", "to", "the", "merged", "configuration", "." ]
train
https://github.com/marcossegovia/twitter-api-client-bundle/blob/3312a5cae144e0b08486778d17cc54b693c4422a/src/DependencyInjection/TwitterApiClientExtension.php#L18-L40
skeeks-semenov/yii2-dadata-suggest-api
helpers/ApiResponse.php
ApiResponse.init
public function init() { try { $this->data = $this->httpClientResponse->data; } catch (\Exception $e) { \Yii::error($this->httpClientResponse->content, self::className()); $this->isError = true; $this->errorMessage = 'Не удалось...
php
public function init() { try { $this->data = $this->httpClientResponse->data; } catch (\Exception $e) { \Yii::error($this->httpClientResponse->content, self::className()); $this->isError = true; $this->errorMessage = 'Не удалось...
[ "public", "function", "init", "(", ")", "{", "try", "{", "$", "this", "->", "data", "=", "$", "this", "->", "httpClientResponse", "->", "data", ";", "}", "catch", "(", "\\", "Exception", "$", "e", ")", "{", "\\", "Yii", "::", "error", "(", "$", "...
Небольшая логика обработки ответа
[ "Небольшая", "логика", "обработки", "ответа" ]
train
https://github.com/skeeks-semenov/yii2-dadata-suggest-api/blob/9ff6e7af54344d059dce0ed08797880142d0ff6b/helpers/ApiResponse.php#L77-L105
activecollab/bootstrap
src/ClassFinder/ClassFinder.php
ClassFinder.scanDirsForInstances
public function scanDirsForInstances(array $dirs, callable $with_found_instance, array $constructor_arguments = []) { foreach ($dirs as $dir_path => $instance_namespace) { $this->scanDirForInstances($dir_path, $instance_namespace, $with_found_instance, $constructor_arguments); } }
php
public function scanDirsForInstances(array $dirs, callable $with_found_instance, array $constructor_arguments = []) { foreach ($dirs as $dir_path => $instance_namespace) { $this->scanDirForInstances($dir_path, $instance_namespace, $with_found_instance, $constructor_arguments); } }
[ "public", "function", "scanDirsForInstances", "(", "array", "$", "dirs", ",", "callable", "$", "with_found_instance", ",", "array", "$", "constructor_arguments", "=", "[", "]", ")", "{", "foreach", "(", "$", "dirs", "as", "$", "dir_path", "=>", "$", "instanc...
{@inheritdoc}
[ "{" ]
train
https://github.com/activecollab/bootstrap/blob/92eea19b2b2b329035f20e855a78f36e74084ccf/src/ClassFinder/ClassFinder.php#L23-L28
activecollab/bootstrap
src/ClassFinder/ClassFinder.php
ClassFinder.scanDirForInstances
public function scanDirForInstances($dir_path, $instance_namespace, callable $with_found_instance, array $constructor_arguments = []) { foreach ($this->scanDirForClasses($dir_path, $instance_namespace, true) as $class_path => $class_name) { if (!class_exists($class_name, false)) { ...
php
public function scanDirForInstances($dir_path, $instance_namespace, callable $with_found_instance, array $constructor_arguments = []) { foreach ($this->scanDirForClasses($dir_path, $instance_namespace, true) as $class_path => $class_name) { if (!class_exists($class_name, false)) { ...
[ "public", "function", "scanDirForInstances", "(", "$", "dir_path", ",", "$", "instance_namespace", ",", "callable", "$", "with_found_instance", ",", "array", "$", "constructor_arguments", "=", "[", "]", ")", "{", "foreach", "(", "$", "this", "->", "scanDirForCla...
{@inheritdoc}
[ "{" ]
train
https://github.com/activecollab/bootstrap/blob/92eea19b2b2b329035f20e855a78f36e74084ccf/src/ClassFinder/ClassFinder.php#L33-L47
activecollab/bootstrap
src/ClassFinder/ClassFinder.php
ClassFinder.scanDirForClasses
public function scanDirForClasses($dir_path, $instance_namespace, $skip_abstract = false) { $result = []; $dir_path = rtrim($dir_path, '/'); if (is_dir($dir_path)) { $dir_path_len = strlen($dir_path); $instance_namespace = rtrim($instance_namespace, '\\'); ...
php
public function scanDirForClasses($dir_path, $instance_namespace, $skip_abstract = false) { $result = []; $dir_path = rtrim($dir_path, '/'); if (is_dir($dir_path)) { $dir_path_len = strlen($dir_path); $instance_namespace = rtrim($instance_namespace, '\\'); ...
[ "public", "function", "scanDirForClasses", "(", "$", "dir_path", ",", "$", "instance_namespace", ",", "$", "skip_abstract", "=", "false", ")", "{", "$", "result", "=", "[", "]", ";", "$", "dir_path", "=", "rtrim", "(", "$", "dir_path", ",", "'/'", ")", ...
{@inheritdoc}
[ "{" ]
train
https://github.com/activecollab/bootstrap/blob/92eea19b2b2b329035f20e855a78f36e74084ccf/src/ClassFinder/ClassFinder.php#L52-L76
PandaPlatform/framework
src/Panda/Support/Configuration/Handlers/RoutesConfiguration.php
RoutesConfiguration.getRoutesPath
public function getRoutesPath($basePath = null) { $routes = $this->get('routes'); if (empty($routes)) { // Fallback to default return $basePath . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR . 'routes' . DIRECTORY_SEPARATOR . 'main.php'; } return $...
php
public function getRoutesPath($basePath = null) { $routes = $this->get('routes'); if (empty($routes)) { // Fallback to default return $basePath . DIRECTORY_SEPARATOR . 'resources' . DIRECTORY_SEPARATOR . 'routes' . DIRECTORY_SEPARATOR . 'main.php'; } return $...
[ "public", "function", "getRoutesPath", "(", "$", "basePath", "=", "null", ")", "{", "$", "routes", "=", "$", "this", "->", "get", "(", "'routes'", ")", ";", "if", "(", "empty", "(", "$", "routes", ")", ")", "{", "// Fallback to default", "return", "$",...
@param string $basePath @return string
[ "@param", "string", "$basePath" ]
train
https://github.com/PandaPlatform/framework/blob/a78cf051b379896b5a4d5df620988e37a0e632f5/src/Panda/Support/Configuration/Handlers/RoutesConfiguration.php#L27-L36
arckinteractive/events_api
classes/Events/API/Calendar.php
Calendar.getAllEvents
public function getAllEvents($starttime = null, $endtime = null) { if (is_null($starttime)) { $starttime = time(); } if (is_null($endtime)) { $endtime = strtotime('+1 year', $starttime); } $starttime = sanitize_int($starttime); $endtime = sanitize_int($endtime); $relationship_name = sanitize_strin...
php
public function getAllEvents($starttime = null, $endtime = null) { if (is_null($starttime)) { $starttime = time(); } if (is_null($endtime)) { $endtime = strtotime('+1 year', $starttime); } $starttime = sanitize_int($starttime); $endtime = sanitize_int($endtime); $relationship_name = sanitize_strin...
[ "public", "function", "getAllEvents", "(", "$", "starttime", "=", "null", ",", "$", "endtime", "=", "null", ")", "{", "if", "(", "is_null", "(", "$", "starttime", ")", ")", "{", "$", "starttime", "=", "time", "(", ")", ";", "}", "if", "(", "is_null...
Returns all event objects @param int $starttime Time range start, default: now @param int $endtime Time range end, default: 1 year from start time @return ElggBatch
[ "Returns", "all", "event", "objects" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Calendar.php#L64-L103
arckinteractive/events_api
classes/Events/API/Calendar.php
Calendar.getAllEventInstances
public function getAllEventInstances($starttime = null, $endtime = null, $export = true, $consumer = '', $tz = null) { $instances = array(); if (!Util::isValidTimezone($tz)) { if (elgg_is_logged_in()) { // if logged in use the timezone settings of the current user $tz = Util::getClientTimezone(); }...
php
public function getAllEventInstances($starttime = null, $endtime = null, $export = true, $consumer = '', $tz = null) { $instances = array(); if (!Util::isValidTimezone($tz)) { if (elgg_is_logged_in()) { // if logged in use the timezone settings of the current user $tz = Util::getClientTimezone(); }...
[ "public", "function", "getAllEventInstances", "(", "$", "starttime", "=", "null", ",", "$", "endtime", "=", "null", ",", "$", "export", "=", "true", ",", "$", "consumer", "=", "''", ",", "$", "tz", "=", "null", ")", "{", "$", "instances", "=", "array...
Returns all event occurrences (one-time and recurring) in a given time range To prevent memory leaks, the return is a sorted array formatted as: <code> array( 0 => array( 'id' => $guid, 'start' => $start_time, 'end' => $end_time, 'title' => $title, 'description' => $description, 'url' => $url, ... ), ); </code> @param...
[ "Returns", "all", "event", "occurrences", "(", "one", "-", "time", "and", "recurring", ")", "in", "a", "given", "time", "range", "To", "prevent", "memory", "leaks", "the", "return", "is", "a", "sorted", "array", "formatted", "as", ":", "<code", ">", "arr...
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Calendar.php#L128-L165
arckinteractive/events_api
classes/Events/API/Calendar.php
Calendar.compareInstancesByStartTime
public static function compareInstancesByStartTime($a, $b) { $start_a = $a->getStartTimestamp(); $start_b = $b->getStartTimestamp(); if ($start_a == $start_b) { return 0; } return ($start_a < $start_b) ? -1 : 1; }
php
public static function compareInstancesByStartTime($a, $b) { $start_a = $a->getStartTimestamp(); $start_b = $b->getStartTimestamp(); if ($start_a == $start_b) { return 0; } return ($start_a < $start_b) ? -1 : 1; }
[ "public", "static", "function", "compareInstancesByStartTime", "(", "$", "a", ",", "$", "b", ")", "{", "$", "start_a", "=", "$", "a", "->", "getStartTimestamp", "(", ")", ";", "$", "start_b", "=", "$", "b", "->", "getStartTimestamp", "(", ")", ";", "if...
Compares two event instances by start time @param EventInstance $a Instance @param EventInstance $b Instance @return int
[ "Compares", "two", "event", "instances", "by", "start", "time" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Calendar.php#L174-L181
arckinteractive/events_api
classes/Events/API/Calendar.php
Calendar.getRecurringEvents
public function getRecurringEvents($starttime = null, $endtime = null) { if (is_null($starttime)) { $starttime = time(); } if (is_null($endtime)) { $endtime = strtotime('+1 year', $starttime); } $starttime = sanitize_int($starttime); $endtime = sanitize_int($endtime); $relationship_name = sanitize...
php
public function getRecurringEvents($starttime = null, $endtime = null) { if (is_null($starttime)) { $starttime = time(); } if (is_null($endtime)) { $endtime = strtotime('+1 year', $starttime); } $starttime = sanitize_int($starttime); $endtime = sanitize_int($endtime); $relationship_name = sanitize...
[ "public", "function", "getRecurringEvents", "(", "$", "starttime", "=", "null", ",", "$", "endtime", "=", "null", ")", "{", "if", "(", "is_null", "(", "$", "starttime", ")", ")", "{", "$", "starttime", "=", "time", "(", ")", ";", "}", "if", "(", "i...
Returns a batch of recurring events in a given time range @param int $starttime Time range start, default: now @param int $endtime Time range end, default: 1 year from start time @return array
[ "Returns", "a", "batch", "of", "recurring", "events", "in", "a", "given", "time", "range" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Calendar.php#L190-L245
arckinteractive/events_api
classes/Events/API/Calendar.php
Calendar.getOneTimeEvents
public function getOneTimeEvents($starttime = null, $endtime = null) { if (is_null($starttime)) { $starttime = time(); } if (is_null($endtime)) { $endtime = strtotime('+1 year', $starttime); } $starttime = sanitize_int($starttime); $endtime = sanitize_int($endtime); $relationship_name = sanitize_s...
php
public function getOneTimeEvents($starttime = null, $endtime = null) { if (is_null($starttime)) { $starttime = time(); } if (is_null($endtime)) { $endtime = strtotime('+1 year', $starttime); } $starttime = sanitize_int($starttime); $endtime = sanitize_int($endtime); $relationship_name = sanitize_s...
[ "public", "function", "getOneTimeEvents", "(", "$", "starttime", "=", "null", ",", "$", "endtime", "=", "null", ")", "{", "if", "(", "is_null", "(", "$", "starttime", ")", ")", "{", "$", "starttime", "=", "time", "(", ")", ";", "}", "if", "(", "is_...
Returns one-time events @param int $starttime Time range start, default: now @param int $endtime Time range end, default: 1 year from start time @return ElggBatch
[ "Returns", "one", "-", "time", "events" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Calendar.php#L254-L297
arckinteractive/events_api
classes/Events/API/Calendar.php
Calendar.hasEvent
public function hasEvent($event) { return (bool) check_entity_relationship($event->guid, self::EVENT_CALENDAR_RELATIONSHIP, $this->guid); }
php
public function hasEvent($event) { return (bool) check_entity_relationship($event->guid, self::EVENT_CALENDAR_RELATIONSHIP, $this->guid); }
[ "public", "function", "hasEvent", "(", "$", "event", ")", "{", "return", "(", "bool", ")", "check_entity_relationship", "(", "$", "event", "->", "guid", ",", "self", "::", "EVENT_CALENDAR_RELATIONSHIP", ",", "$", "this", "->", "guid", ")", ";", "}" ]
Checks if the event is on calendar @param Event $event Event @return bool
[ "Checks", "if", "the", "event", "is", "on", "calendar" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Calendar.php#L316-L318
arckinteractive/events_api
classes/Events/API/Calendar.php
Calendar.addEvent
public function addEvent($event) { $result = add_entity_relationship($event->guid, self::EVENT_CALENDAR_RELATIONSHIP, $this->guid); if ($result) { // allow events to fire after confirmation that it has been added to the calendar elgg_trigger_event('events_api', 'add_to_calendar', array('event' => $event, 'ca...
php
public function addEvent($event) { $result = add_entity_relationship($event->guid, self::EVENT_CALENDAR_RELATIONSHIP, $this->guid); if ($result) { // allow events to fire after confirmation that it has been added to the calendar elgg_trigger_event('events_api', 'add_to_calendar', array('event' => $event, 'ca...
[ "public", "function", "addEvent", "(", "$", "event", ")", "{", "$", "result", "=", "add_entity_relationship", "(", "$", "event", "->", "guid", ",", "self", "::", "EVENT_CALENDAR_RELATIONSHIP", ",", "$", "this", "->", "guid", ")", ";", "if", "(", "$", "re...
Adds an event to a calendar @param Event $event Event object @return boolean
[ "Adds", "an", "event", "to", "a", "calendar" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Calendar.php#L326-L334
arckinteractive/events_api
classes/Events/API/Calendar.php
Calendar.removeEvent
public function removeEvent($event) { $result = remove_entity_relationship($event->guid, self::EVENT_CALENDAR_RELATIONSHIP, $this->guid); if ($result) { // allow events to fire after confirmation that it has been added to the calendar elgg_trigger_event('events_api', 'remove_from_calendar', array('event' => ...
php
public function removeEvent($event) { $result = remove_entity_relationship($event->guid, self::EVENT_CALENDAR_RELATIONSHIP, $this->guid); if ($result) { // allow events to fire after confirmation that it has been added to the calendar elgg_trigger_event('events_api', 'remove_from_calendar', array('event' => ...
[ "public", "function", "removeEvent", "(", "$", "event", ")", "{", "$", "result", "=", "remove_entity_relationship", "(", "$", "event", "->", "guid", ",", "self", "::", "EVENT_CALENDAR_RELATIONSHIP", ",", "$", "this", "->", "guid", ")", ";", "if", "(", "$",...
Removes an event from a calendar @param Event $event Event object @return boolean
[ "Removes", "an", "event", "from", "a", "calendar" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Calendar.php#L342-L351
arckinteractive/events_api
classes/Events/API/Calendar.php
Calendar.getIcalURL
public function getIcalURL($base_url = '', array $params = array()) { $user = elgg_get_logged_in_user_entity(); $params['view'] = 'ical'; $params['u'] = $user->guid; $params['t'] = $this->getUserToken($user->guid); $url = elgg_http_add_url_query_elements($base_url, $params); return elgg_normalize_url($ur...
php
public function getIcalURL($base_url = '', array $params = array()) { $user = elgg_get_logged_in_user_entity(); $params['view'] = 'ical'; $params['u'] = $user->guid; $params['t'] = $this->getUserToken($user->guid); $url = elgg_http_add_url_query_elements($base_url, $params); return elgg_normalize_url($ur...
[ "public", "function", "getIcalURL", "(", "$", "base_url", "=", "''", ",", "array", "$", "params", "=", "array", "(", ")", ")", "{", "$", "user", "=", "elgg_get_logged_in_user_entity", "(", ")", ";", "$", "params", "[", "'view'", "]", "=", "'ical'", ";"...
Returns a URL of the iCal feed @param string $base_url Base URL @param array $params Additional params @return string
[ "Returns", "a", "URL", "of", "the", "iCal", "feed" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Calendar.php#L360-L370
arckinteractive/events_api
classes/Events/API/Calendar.php
Calendar.toIcal
public function toIcal($starttime = null, $endtime = null, $filename = 'calendar.ics') { if (is_null($starttime)) { $starttime = time(); } if (is_null($endtime)) { $endtime = strtotime('+1 year', $starttime); } $instances = $this->getAllEventInstances($starttime, $endtime, true, 'ical'); $config = ...
php
public function toIcal($starttime = null, $endtime = null, $filename = 'calendar.ics') { if (is_null($starttime)) { $starttime = time(); } if (is_null($endtime)) { $endtime = strtotime('+1 year', $starttime); } $instances = $this->getAllEventInstances($starttime, $endtime, true, 'ical'); $config = ...
[ "public", "function", "toIcal", "(", "$", "starttime", "=", "null", ",", "$", "endtime", "=", "null", ",", "$", "filename", "=", "'calendar.ics'", ")", "{", "if", "(", "is_null", "(", "$", "starttime", ")", ")", "{", "$", "starttime", "=", "time", "(...
Returns an iCal feed for this calendar @param int $starttime Range start timestamp @param int $endtime Range end timestamp @param string $filename Filename used for output file @return string
[ "Returns", "an", "iCal", "feed", "for", "this", "calendar" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Calendar.php#L380-L440
arckinteractive/events_api
classes/Events/API/Calendar.php
Calendar.createPublicCalendar
public static function createPublicCalendar($container) { if (!$container instanceof ElggEntity) { return false; } try { $calendar = new Calendar(); $calendar->access_id = ACCESS_PUBLIC; $calendar->owner_guid = $container->guid; $calendar->container_guid = $container->guid; $calendar->__public...
php
public static function createPublicCalendar($container) { if (!$container instanceof ElggEntity) { return false; } try { $calendar = new Calendar(); $calendar->access_id = ACCESS_PUBLIC; $calendar->owner_guid = $container->guid; $calendar->container_guid = $container->guid; $calendar->__public...
[ "public", "static", "function", "createPublicCalendar", "(", "$", "container", ")", "{", "if", "(", "!", "$", "container", "instanceof", "ElggEntity", ")", "{", "return", "false", ";", "}", "try", "{", "$", "calendar", "=", "new", "Calendar", "(", ")", "...
Creates a public calendar for a container @param ElggEntity $container User or group @return Calendar
[ "Creates", "a", "public", "calendar", "for", "a", "container" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Calendar.php#L448-L471
arckinteractive/events_api
classes/Events/API/Calendar.php
Calendar.getCalendars
public static function getCalendars($container, $count = false) { if (!$container instanceof ElggEntity) { return false; } $options = array( 'type' => 'object', 'subtype' => 'calendar', 'container_guid' => $container->guid, 'limit' => false ); if ($count) { $options['count'] = true; ret...
php
public static function getCalendars($container, $count = false) { if (!$container instanceof ElggEntity) { return false; } $options = array( 'type' => 'object', 'subtype' => 'calendar', 'container_guid' => $container->guid, 'limit' => false ); if ($count) { $options['count'] = true; ret...
[ "public", "static", "function", "getCalendars", "(", "$", "container", ",", "$", "count", "=", "false", ")", "{", "if", "(", "!", "$", "container", "instanceof", "ElggEntity", ")", "{", "return", "false", ";", "}", "$", "options", "=", "array", "(", "'...
Retrieves all calendars for a container @param type $container @param type $count
[ "Retrieves", "all", "calendars", "for", "a", "container" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Calendar.php#L479-L497
arckinteractive/events_api
classes/Events/API/Calendar.php
Calendar.getPublicCalendar
public static function getPublicCalendar($container) { if (!$container instanceof ElggEntity) { return false; } $calendars = elgg_get_entities(array( 'type' => 'object', 'subtype' => Calendar::SUBTYPE, 'container_guid' => $container->guid, 'limit' => 1, 'metadata_name_value_pairs' => array( ...
php
public static function getPublicCalendar($container) { if (!$container instanceof ElggEntity) { return false; } $calendars = elgg_get_entities(array( 'type' => 'object', 'subtype' => Calendar::SUBTYPE, 'container_guid' => $container->guid, 'limit' => 1, 'metadata_name_value_pairs' => array( ...
[ "public", "static", "function", "getPublicCalendar", "(", "$", "container", ")", "{", "if", "(", "!", "$", "container", "instanceof", "ElggEntity", ")", "{", "return", "false", ";", "}", "$", "calendars", "=", "elgg_get_entities", "(", "array", "(", "'type'"...
Retrieves user's or group's public calendar @param ElggEntity $container User or group @return Calendar|false
[ "Retrieves", "user", "s", "or", "group", "s", "public", "calendar" ]
train
https://github.com/arckinteractive/events_api/blob/56c0f0ae403af1672a913db5dc259db9cb712491/classes/Events/API/Calendar.php#L505-L524
joomla-projects/jorobo
src/Tasks/Build/Plugin.php
Plugin.run
public function run() { $this->say('Building plugin: ' . $this->plgName . " (" . $this->plgType . ")"); // Prepare directories $this->prepareDirectories(); $files = $this->copyTarget($this->source, $this->target); // Build media (relative path) $media = $this->buildMedia("media/plg_" . $this->plgType . ...
php
public function run() { $this->say('Building plugin: ' . $this->plgName . " (" . $this->plgType . ")"); // Prepare directories $this->prepareDirectories(); $files = $this->copyTarget($this->source, $this->target); // Build media (relative path) $media = $this->buildMedia("media/plg_" . $this->plgType . ...
[ "public", "function", "run", "(", ")", "{", "$", "this", "->", "say", "(", "'Building plugin: '", ".", "$", "this", "->", "plgName", ".", "\" (\"", ".", "$", "this", "->", "plgType", ".", "\")\"", ")", ";", "// Prepare directories", "$", "this", "->", ...
Build the package @return bool @since 1.0
[ "Build", "the", "package" ]
train
https://github.com/joomla-projects/jorobo/blob/e72dd0ed15f387739f67cacdbc2c0bd1b427f317/src/Tasks/Build/Plugin.php#L67-L90
attm2x/m2x-php
src/Device.php
Device.location
public function location() { $response = $this->client->get(self::$path . '/' . $this->id . '/location'); if ($response->statusCode == 204) { return False; } return $response->json(); }
php
public function location() { $response = $this->client->get(self::$path . '/' . $this->id . '/location'); if ($response->statusCode == 204) { return False; } return $response->json(); }
[ "public", "function", "location", "(", ")", "{", "$", "response", "=", "$", "this", "->", "client", "->", "get", "(", "self", "::", "$", "path", ".", "'/'", ".", "$", "this", "->", "id", ".", "'/location'", ")", ";", "if", "(", "$", "response", "...
Method for {@link https://m2x.att.com/developer/documentation/v2/device#Read-Device-Location Read Device Location} endpoint. It will get location details of the device, will return False if no location details are available. Otherwise it will return an array with the details. @return array|boolean Most recently logged...
[ "Method", "for", "{", "@link", "https", ":", "//", "m2x", ".", "att", ".", "com", "/", "developer", "/", "documentation", "/", "v2", "/", "device#Read", "-", "Device", "-", "Location", "Read", "Device", "Location", "}", "endpoint", ".", "It", "will", "...
train
https://github.com/attm2x/m2x-php/blob/4c2ff6d70af50538818855e648af24bf5cf16ead/src/Device.php#L46-L54
attm2x/m2x-php
src/Device.php
Device.updateLocation
public function updateLocation($data) { $response = $this->client->put(self::$path . '/' . $this->id . '/location', $data); return $this; }
php
public function updateLocation($data) { $response = $this->client->put(self::$path . '/' . $this->id . '/location', $data); return $this; }
[ "public", "function", "updateLocation", "(", "$", "data", ")", "{", "$", "response", "=", "$", "this", "->", "client", "->", "put", "(", "self", "::", "$", "path", ".", "'/'", ".", "$", "this", "->", "id", ".", "'/location'", ",", "$", "data", ")",...
Method for{@link https://m2x.att.com/developer/documentation/v2/device#Update-Device-Location Update Device Location} endpoint. @param array $data Query parameters passed as keyword arguments. View M2X API Docs for listing of available parameters. @return Device The API response, see M2X API docs for details
[ "Method", "for", "{", "@link", "https", ":", "//", "m2x", ".", "att", ".", "com", "/", "developer", "/", "documentation", "/", "v2", "/", "device#Update", "-", "Device", "-", "Location", "Update", "Device", "Location", "}", "endpoint", "." ]
train
https://github.com/attm2x/m2x-php/blob/4c2ff6d70af50538818855e648af24bf5cf16ead/src/Device.php#L62-L65
attm2x/m2x-php
src/Device.php
Device.locationHistory
public function locationHistory($data) { $response = $this->client->get(self::$path . '/' . $this->id . '/location/waypoints', $data); return $response->json(); }
php
public function locationHistory($data) { $response = $this->client->get(self::$path . '/' . $this->id . '/location/waypoints', $data); return $response->json(); }
[ "public", "function", "locationHistory", "(", "$", "data", ")", "{", "$", "response", "=", "$", "this", "->", "client", "->", "get", "(", "self", "::", "$", "path", ".", "'/'", ".", "$", "this", "->", "id", ".", "'/location/waypoints'", ",", "$", "da...
Method for {@link https://m2x.att.com/developer/documentation/v2/device#Read-Device-Location-History Read location history} endpoint. @param $data optional Query parameters passed as keyword arguments. View M2X API Docs for listing of available parameters. @return array Location history of the Device
[ "Method", "for", "{", "@link", "https", ":", "//", "m2x", ".", "att", ".", "com", "/", "developer", "/", "documentation", "/", "v2", "/", "device#Read", "-", "Device", "-", "Location", "-", "History", "Read", "location", "history", "}", "endpoint", "." ]
train
https://github.com/attm2x/m2x-php/blob/4c2ff6d70af50538818855e648af24bf5cf16ead/src/Device.php#L73-L76
attm2x/m2x-php
src/Device.php
Device.deleteLocationHistory
public function deleteLocationHistory($data) { $response = $this->client->delete(self::$path . '/' . $this->id . '/location/waypoints', $data); return $this; }
php
public function deleteLocationHistory($data) { $response = $this->client->delete(self::$path . '/' . $this->id . '/location/waypoints', $data); return $this; }
[ "public", "function", "deleteLocationHistory", "(", "$", "data", ")", "{", "$", "response", "=", "$", "this", "->", "client", "->", "delete", "(", "self", "::", "$", "path", ".", "'/'", ".", "$", "this", "->", "id", ".", "'/location/waypoints'", ",", "...
Method for {@link https://m2x.att.com/developer/documentation/v2/device#Delete-Location-History Delete location history} endpoint. @param array $data Query parameters passed as keyword arguments. View M2X API Docs for listing of available parameters. @return Device The API response, see M2X API docs for details
[ "Method", "for", "{", "@link", "https", ":", "//", "m2x", ".", "att", ".", "com", "/", "developer", "/", "documentation", "/", "v2", "/", "device#Delete", "-", "Location", "-", "History", "Delete", "location", "history", "}", "endpoint", "." ]
train
https://github.com/attm2x/m2x-php/blob/4c2ff6d70af50538818855e648af24bf5cf16ead/src/Device.php#L84-L87
attm2x/m2x-php
src/Device.php
Device.postUpdates
public function postUpdates($values) { $data = array('values' => $values); return $this->client->post($this->path() . '/updates', $data); }
php
public function postUpdates($values) { $data = array('values' => $values); return $this->client->post($this->path() . '/updates', $data); }
[ "public", "function", "postUpdates", "(", "$", "values", ")", "{", "$", "data", "=", "array", "(", "'values'", "=>", "$", "values", ")", ";", "return", "$", "this", "->", "client", "->", "post", "(", "$", "this", "->", "path", "(", ")", ".", "'/upd...
Method for {@link https://m2x.att.com/developer/documentation/v2/device#Post-Device-Updates--Multiple-Values-to-Multiple-Streams Post Device Updates (Multiple Values to Multiple Streams)} endpoint. This method allows posting multiple values to multiple streams belonging to a device and optionally, the device location....
[ "Method", "for", "{", "@link", "https", ":", "//", "m2x", ".", "att", ".", "com", "/", "developer", "/", "documentation", "/", "v2", "/", "device#Post", "-", "Device", "-", "Updates", "--", "Multiple", "-", "Values", "-", "to", "-", "Multiple", "-", ...
train
https://github.com/attm2x/m2x-php/blob/4c2ff6d70af50538818855e648af24bf5cf16ead/src/Device.php#L142-L145
attm2x/m2x-php
src/Device.php
Device.valuesSearch
public function valuesSearch($params) { $response = $this->client->get($this->path() . '/values/search', array(), $params); return $response->json(); }
php
public function valuesSearch($params) { $response = $this->client->get($this->path() . '/values/search', array(), $params); return $response->json(); }
[ "public", "function", "valuesSearch", "(", "$", "params", ")", "{", "$", "response", "=", "$", "this", "->", "client", "->", "get", "(", "$", "this", "->", "path", "(", ")", ".", "'/values/search'", ",", "array", "(", ")", ",", "$", "params", ")", ...
Method for {@link https://m2x.att.com/developer/documentation/v2/device#Search-Values-from-all-Data-Streams-of-a-Device Search Values from all Data Streams} endpoint. @param array $params Query parameters passed as keyword arguments. View M2X API Docs for listing of available parameters. @return array The API response...
[ "Method", "for", "{", "@link", "https", ":", "//", "m2x", ".", "att", ".", "com", "/", "developer", "/", "documentation", "/", "v2", "/", "device#Search", "-", "Values", "-", "from", "-", "all", "-", "Data", "-", "Streams", "-", "of", "-", "a", "-"...
train
https://github.com/attm2x/m2x-php/blob/4c2ff6d70af50538818855e648af24bf5cf16ead/src/Device.php#L210-L213
attm2x/m2x-php
src/Device.php
Device.log
public function log() { $response = $this->client->get($this->path() . '/log'); return current($response->json()); }
php
public function log() { $response = $this->client->get($this->path() . '/log'); return current($response->json()); }
[ "public", "function", "log", "(", ")", "{", "$", "response", "=", "$", "this", "->", "client", "->", "get", "(", "$", "this", "->", "path", "(", ")", ".", "'/log'", ")", ";", "return", "current", "(", "$", "response", "->", "json", "(", ")", ")",...
Method for {@link https://m2x.att.com/developer/documentation/v2/device#View-Request-Log View Request Log} endpoint. (up to 100 latest entries). @return array Most recent API requests made against this Device
[ "Method", "for", "{", "@link", "https", ":", "//", "m2x", ".", "att", ".", "com", "/", "developer", "/", "documentation", "/", "v2", "/", "device#View", "-", "Request", "-", "Log", "View", "Request", "Log", "}", "endpoint", ".", "(", "up", "to", "100...
train
https://github.com/attm2x/m2x-php/blob/4c2ff6d70af50538818855e648af24bf5cf16ead/src/Device.php#L220-L223
attm2x/m2x-php
src/Device.php
Device.reject
public function reject($command, $data = null) { return $this->client->post($this->path() . $command->path() . '/reject', $data); }
php
public function reject($command, $data = null) { return $this->client->post($this->path() . $command->path() . '/reject', $data); }
[ "public", "function", "reject", "(", "$", "command", ",", "$", "data", "=", "null", ")", "{", "return", "$", "this", "->", "client", "->", "post", "(", "$", "this", "->", "path", "(", ")", ".", "$", "command", "->", "path", "(", ")", ".", "'/reje...
Method for {@link https://m2x.att.com/developer/documentation/v2/commands#Device-Marks-a-Command-as-Rejected Device Marks Command as rejected} endpoint. @param Command $command ID of the Command being marked as rejected @param array $data Query parameters passed as keyword arguments. View M2X API Docs for listing of a...
[ "Method", "for", "{", "@link", "https", ":", "//", "m2x", ".", "att", ".", "com", "/", "developer", "/", "documentation", "/", "v2", "/", "commands#Device", "-", "Marks", "-", "a", "-", "Command", "-", "as", "-", "Rejected", "Device", "Marks", "Command...
train
https://github.com/attm2x/m2x-php/blob/4c2ff6d70af50538818855e648af24bf5cf16ead/src/Device.php#L253-L255
attm2x/m2x-php
src/Device.php
Device.process
public function process($command, $data = null) { return $this->client->post($this->path() . $command->path() . '/process', $data); }
php
public function process($command, $data = null) { return $this->client->post($this->path() . $command->path() . '/process', $data); }
[ "public", "function", "process", "(", "$", "command", ",", "$", "data", "=", "null", ")", "{", "return", "$", "this", "->", "client", "->", "post", "(", "$", "this", "->", "path", "(", ")", ".", "$", "command", "->", "path", "(", ")", ".", "'/pro...
Method for {@link https://m2x.att.com/developer/documentation/v2/commands#Device-Marks-a-Command-as-Processed Device marks Command as processed} endpoint. @param Command $command ID of the Command being marked as processed @param array $data Query parameters passed as keyword arguments. View M2X API Docs for listing o...
[ "Method", "for", "{", "@link", "https", ":", "//", "m2x", ".", "att", ".", "com", "/", "developer", "/", "documentation", "/", "v2", "/", "commands#Device", "-", "Marks", "-", "a", "-", "Command", "-", "as", "-", "Processed", "Device", "marks", "Comman...
train
https://github.com/attm2x/m2x-php/blob/4c2ff6d70af50538818855e648af24bf5cf16ead/src/Device.php#L264-L266
attm2x/m2x-php
src/Device.php
Device.updateSingleStream
public function updateSingleStream($name, $params = array()) { return $this->client->put($this->path() . '/streams/' . $name . '/value' , $params); }
php
public function updateSingleStream($name, $params = array()) { return $this->client->put($this->path() . '/streams/' . $name . '/value' , $params); }
[ "public", "function", "updateSingleStream", "(", "$", "name", ",", "$", "params", "=", "array", "(", ")", ")", "{", "return", "$", "this", "->", "client", "->", "put", "(", "$", "this", "->", "path", "(", ")", ".", "'/streams/'", ".", "$", "name", ...
Method for {@link https://m2x.att.com/developer/documentation/v2/device#Update-Data-Stream-Values Update Data Stream Values} endpoint. @param string $name Stream name to be updated @param array $params Query parameters passed as keyword arguments. View M2X API Docs for listing of available parameters. @return HttpRes...
[ "Method", "for", "{", "@link", "https", ":", "//", "m2x", ".", "att", ".", "com", "/", "developer", "/", "documentation", "/", "v2", "/", "device#Update", "-", "Data", "-", "Stream", "-", "Values", "Update", "Data", "Stream", "Values", "}", "endpoint", ...
train
https://github.com/attm2x/m2x-php/blob/4c2ff6d70af50538818855e648af24bf5cf16ead/src/Device.php#L319-L321
ahuggins/utilities
src/Console/Commands/AddProviders.php
AddProviders.handle
public function handle() { $namespace = $this->argument('namespace') . '\Config'; $providers = (new $namespace)(); if (array_key_exists('providers', $providers)) { dump($providers['providers']); } if (array_key_exists('aliases', $providers)) { dd($pro...
php
public function handle() { $namespace = $this->argument('namespace') . '\Config'; $providers = (new $namespace)(); if (array_key_exists('providers', $providers)) { dump($providers['providers']); } if (array_key_exists('aliases', $providers)) { dd($pro...
[ "public", "function", "handle", "(", ")", "{", "$", "namespace", "=", "$", "this", "->", "argument", "(", "'namespace'", ")", ".", "'\\Config'", ";", "$", "providers", "=", "(", "new", "$", "namespace", ")", "(", ")", ";", "if", "(", "array_key_exists"...
Execute the console command. @return mixed
[ "Execute", "the", "console", "command", "." ]
train
https://github.com/ahuggins/utilities/blob/efb79f2dd12335e8115722568239ee22c899e0f1/src/Console/Commands/AddProviders.php#L38-L49
iP1SMS/ip1-php-sdk
src/Recipient/ProcessedGroup.php
ProcessedGroup.getMemberships
public function getMemberships(Communicator $communicator = null): ClassValidationArray { if ($communicator !== null) { $membershipJSON = $communicator->get("api/groups/".$this->groupID."/memberships"); $membershipStd = json_decode($membershipJSON); $memberships = []; ...
php
public function getMemberships(Communicator $communicator = null): ClassValidationArray { if ($communicator !== null) { $membershipJSON = $communicator->get("api/groups/".$this->groupID."/memberships"); $membershipStd = json_decode($membershipJSON); $memberships = []; ...
[ "public", "function", "getMemberships", "(", "Communicator", "$", "communicator", "=", "null", ")", ":", "ClassValidationArray", "{", "if", "(", "$", "communicator", "!==", "null", ")", "{", "$", "membershipJSON", "=", "$", "communicator", "->", "get", "(", ...
Returns an array of all the memberships the group is referenced in. If a communicator is not provided it will not fetch memberships from the API but return those that has been fetched, if any. @param Communicator $communicator Used to fetch memberships from the API. @return array An array of Membership objects
[ "Returns", "an", "array", "of", "all", "the", "memberships", "the", "group", "is", "referenced", "in", ".", "If", "a", "communicator", "is", "not", "provided", "it", "will", "not", "fetch", "memberships", "from", "the", "API", "but", "return", "those", "th...
train
https://github.com/iP1SMS/ip1-php-sdk/blob/348e6572a279363ba689c9e0f5689b83a25930f5/src/Recipient/ProcessedGroup.php#L130-L143
iP1SMS/ip1-php-sdk
src/Recipient/ProcessedGroup.php
ProcessedGroup.getContacts
public function getContacts(Communicator $communicator = null): ClassValidationArray { if ($communicator !== null) { $contactStd = $communicator->get('api/groups/'.$this->groupID. '/contacts'); $contactStd = json_decode($contactStd); $contacts = RecipientFactory::createPr...
php
public function getContacts(Communicator $communicator = null): ClassValidationArray { if ($communicator !== null) { $contactStd = $communicator->get('api/groups/'.$this->groupID. '/contacts'); $contactStd = json_decode($contactStd); $contacts = RecipientFactory::createPr...
[ "public", "function", "getContacts", "(", "Communicator", "$", "communicator", "=", "null", ")", ":", "ClassValidationArray", "{", "if", "(", "$", "communicator", "!==", "null", ")", "{", "$", "contactStd", "=", "$", "communicator", "->", "get", "(", "'api/g...
Returns an array of all the Contacts that belong to the Group. If a communicator is not provided it will not fetch Contacts from the API but return those that has been fetched, if any. @param Communicator $communicator Used to fetch Contacts from the API. @return ClassValidationArray An array of ProcessedContact object...
[ "Returns", "an", "array", "of", "all", "the", "Contacts", "that", "belong", "to", "the", "Group", ".", "If", "a", "communicator", "is", "not", "provided", "it", "will", "not", "fetch", "Contacts", "from", "the", "API", "but", "return", "those", "that", "...
train
https://github.com/iP1SMS/ip1-php-sdk/blob/348e6572a279363ba689c9e0f5689b83a25930f5/src/Recipient/ProcessedGroup.php#L159-L169