id
int32
0
241k
repo
stringlengths
6
63
path
stringlengths
5
140
func_name
stringlengths
3
151
original_string
stringlengths
84
13k
language
stringclasses
1 value
code
stringlengths
84
13k
code_tokens
list
docstring
stringlengths
3
47.2k
docstring_tokens
list
sha
stringlengths
40
40
url
stringlengths
91
247
228,000
crossjoin/PreMailer
src/Crossjoin/PreMailer/PreMailerAbstract.php
PreMailerAbstract.prepareText
protected function prepareText(\DOMDocument $doc) { $text = $this->convertHtmlToText($doc->childNodes); $charset = $this->getCharset(); $textLineMaxLength = $this->getOption(self::OPTION_TEXT_LINE_WIDTH); $text = preg_replace_callback('/^([^\n]+)$/m', function($match) use ($charset,...
php
protected function prepareText(\DOMDocument $doc) { $text = $this->convertHtmlToText($doc->childNodes); $charset = $this->getCharset(); $textLineMaxLength = $this->getOption(self::OPTION_TEXT_LINE_WIDTH); $text = preg_replace_callback('/^([^\n]+)$/m', function($match) use ($charset,...
[ "protected", "function", "prepareText", "(", "\\", "DOMDocument", "$", "doc", ")", "{", "$", "text", "=", "$", "this", "->", "convertHtmlToText", "(", "$", "doc", "->", "childNodes", ")", ";", "$", "charset", "=", "$", "this", "->", "getCharset", "(", ...
Prepares the mail text content. @param \DOMDocument $doc @return string
[ "Prepares", "the", "mail", "text", "content", "." ]
e1fbd426a9f3ba2d5d00f6641b2509c72bf4f561
https://github.com/crossjoin/PreMailer/blob/e1fbd426a9f3ba2d5d00f6641b2509c72bf4f561/src/Crossjoin/PreMailer/PreMailerAbstract.php#L477-L544
228,001
crossjoin/PreMailer
src/Crossjoin/PreMailer/PreMailerAbstract.php
PreMailerAbstract.convertHtmlToText
protected function convertHtmlToText(\DOMNodeList $nodes) { $text = ""; /** @var \DOMElement $node */ foreach ($nodes as $node) { $lineBreaksBefore = 0; $lineBreaksAfter = 0; $lineCharBefore = ""; $lineCharAfter = ""; $prefix = "";...
php
protected function convertHtmlToText(\DOMNodeList $nodes) { $text = ""; /** @var \DOMElement $node */ foreach ($nodes as $node) { $lineBreaksBefore = 0; $lineBreaksAfter = 0; $lineCharBefore = ""; $lineCharAfter = ""; $prefix = "";...
[ "protected", "function", "convertHtmlToText", "(", "\\", "DOMNodeList", "$", "nodes", ")", "{", "$", "text", "=", "\"\"", ";", "/** @var \\DOMElement $node */", "foreach", "(", "$", "nodes", "as", "$", "node", ")", "{", "$", "lineBreaksBefore", "=", "0", ";"...
Converts HTML tags to text, to create a text version of an HTML document. @param \DOMNodeList $nodes @return string
[ "Converts", "HTML", "tags", "to", "text", "to", "create", "a", "text", "version", "of", "an", "HTML", "document", "." ]
e1fbd426a9f3ba2d5d00f6641b2509c72bf4f561
https://github.com/crossjoin/PreMailer/blob/e1fbd426a9f3ba2d5d00f6641b2509c72bf4f561/src/Crossjoin/PreMailer/PreMailerAbstract.php#L552-L632
228,002
brick/http
src/Request.php
Request.getCurrentRequestHeaders
private static function getCurrentRequestHeaders() : array { $headers = []; if (function_exists('apache_request_headers')) { $requestHeaders = apache_request_headers(); if ($requestHeaders) { foreach ($requestHeaders as $key => $value) { ...
php
private static function getCurrentRequestHeaders() : array { $headers = []; if (function_exists('apache_request_headers')) { $requestHeaders = apache_request_headers(); if ($requestHeaders) { foreach ($requestHeaders as $key => $value) { ...
[ "private", "static", "function", "getCurrentRequestHeaders", "(", ")", ":", "array", "{", "$", "headers", "=", "[", "]", ";", "if", "(", "function_exists", "(", "'apache_request_headers'", ")", ")", "{", "$", "requestHeaders", "=", "apache_request_headers", "(",...
Returns the current request headers. The headers are prepared in the format expected by `Message::$headers`: - keys are lowercased - values are arrays of strings @return array
[ "Returns", "the", "current", "request", "headers", "." ]
1b185b0563d10f9f4293c254aa411545da00b597
https://github.com/brick/http/blob/1b185b0563d10f9f4293c254aa411545da00b597/src/Request.php#L260-L289
228,003
brick/http
src/Request.php
Request.setQuery
public function setQuery(array $query) : Request { $this->queryString = http_build_query($query); // Ensure that we get a value for getQuery() that's consistent with the query string, and whose scalar values // have all been converted to strings, to get a result similar to what we'd get wit...
php
public function setQuery(array $query) : Request { $this->queryString = http_build_query($query); // Ensure that we get a value for getQuery() that's consistent with the query string, and whose scalar values // have all been converted to strings, to get a result similar to what we'd get wit...
[ "public", "function", "setQuery", "(", "array", "$", "query", ")", ":", "Request", "{", "$", "this", "->", "queryString", "=", "http_build_query", "(", "$", "query", ")", ";", "// Ensure that we get a value for getQuery() that's consistent with the query string, and whose...
Sets the query parameters. @param array $query The associative array of parameters. @return static This request.
[ "Sets", "the", "query", "parameters", "." ]
1b185b0563d10f9f4293c254aa411545da00b597
https://github.com/brick/http/blob/1b185b0563d10f9f4293c254aa411545da00b597/src/Request.php#L322-L337
228,004
brick/http
src/Request.php
Request.setPost
public function setPost(array $post) : Request { // Ensure that we get a value for getQuery() that's consistent with the query string, and whose scalar values // have all been converted to strings, to get a result similar to what we'd get with an incoming HTTP request. parse_str(http_build_q...
php
public function setPost(array $post) : Request { // Ensure that we get a value for getQuery() that's consistent with the query string, and whose scalar values // have all been converted to strings, to get a result similar to what we'd get with an incoming HTTP request. parse_str(http_build_q...
[ "public", "function", "setPost", "(", "array", "$", "post", ")", ":", "Request", "{", "// Ensure that we get a value for getQuery() that's consistent with the query string, and whose scalar values", "// have all been converted to strings, to get a result similar to what we'd get with an inco...
Sets the post parameter. This will set a request body with the URL-encoded data, unless the Content-Type of this request is multipart/form-data, in which case the body is left as is. @param array $post The associative array of parameters. @return static This request.
[ "Sets", "the", "post", "parameter", "." ]
1b185b0563d10f9f4293c254aa411545da00b597
https://github.com/brick/http/blob/1b185b0563d10f9f4293c254aa411545da00b597/src/Request.php#L366-L381
228,005
brick/http
src/Request.php
Request.getFile
public function getFile(string $name) : ?UploadedFile { $file = $this->resolvePath($this->files, $name); if ($file instanceof UploadedFile) { return $file; } return null; }
php
public function getFile(string $name) : ?UploadedFile { $file = $this->resolvePath($this->files, $name); if ($file instanceof UploadedFile) { return $file; } return null; }
[ "public", "function", "getFile", "(", "string", "$", "name", ")", ":", "?", "UploadedFile", "{", "$", "file", "=", "$", "this", "->", "resolvePath", "(", "$", "this", "->", "files", ",", "$", "name", ")", ";", "if", "(", "$", "file", "instanceof", ...
Returns the uploaded file by the given name. If no uploaded file exists by that name, or if the name maps to an array of uploaded files, this method returns NULL. @param string $name The name of the file input field. @return \Brick\Http\UploadedFile|null The uploaded file, or NULL if not found.
[ "Returns", "the", "uploaded", "file", "by", "the", "given", "name", "." ]
1b185b0563d10f9f4293c254aa411545da00b597
https://github.com/brick/http/blob/1b185b0563d10f9f4293c254aa411545da00b597/src/Request.php#L394-L403
228,006
brick/http
src/Request.php
Request.getFiles
public function getFiles(string $name = null) : array { if ($name === null) { return $this->files; } $files = $this->resolvePath($this->files, $name); if ($files instanceof UploadedFile) { return [$files]; } if (is_array($files)) { ...
php
public function getFiles(string $name = null) : array { if ($name === null) { return $this->files; } $files = $this->resolvePath($this->files, $name); if ($files instanceof UploadedFile) { return [$files]; } if (is_array($files)) { ...
[ "public", "function", "getFiles", "(", "string", "$", "name", "=", "null", ")", ":", "array", "{", "if", "(", "$", "name", "===", "null", ")", "{", "return", "$", "this", "->", "files", ";", "}", "$", "files", "=", "$", "this", "->", "resolvePath",...
Returns the uploaded files under the given name. If no uploaded files by that name exist, an empty array is returned. @param string $name The name of the file input fields. @return \Brick\Http\UploadedFile[] The uploaded files.
[ "Returns", "the", "uploaded", "files", "under", "the", "given", "name", "." ]
1b185b0563d10f9f4293c254aa411545da00b597
https://github.com/brick/http/blob/1b185b0563d10f9f4293c254aa411545da00b597/src/Request.php#L414-L433
228,007
brick/http
src/Request.php
Request.setCookies
public function setCookies(array $cookies) : Request { $query = http_build_query($cookies); parse_str($query, $this->cookies); if ($cookies) { $cookie = str_replace('&', '; ', $query); $this->setHeader('Cookie', $cookie); } else { $this->removeHea...
php
public function setCookies(array $cookies) : Request { $query = http_build_query($cookies); parse_str($query, $this->cookies); if ($cookies) { $cookie = str_replace('&', '; ', $query); $this->setHeader('Cookie', $cookie); } else { $this->removeHea...
[ "public", "function", "setCookies", "(", "array", "$", "cookies", ")", ":", "Request", "{", "$", "query", "=", "http_build_query", "(", "$", "cookies", ")", ";", "parse_str", "(", "$", "query", ",", "$", "this", "->", "cookies", ")", ";", "if", "(", ...
Sets the cookies for this request. All existing cookies will be replaced. @param array $cookies An associative array of cookies. @return static This request.
[ "Sets", "the", "cookies", "for", "this", "request", "." ]
1b185b0563d10f9f4293c254aa411545da00b597
https://github.com/brick/http/blob/1b185b0563d10f9f4293c254aa411545da00b597/src/Request.php#L521-L534
228,008
brick/http
src/Request.php
Request.setMethod
public function setMethod(string $method) : Request { $this->method = $this->fixMethodCase($method); return $this; }
php
public function setMethod(string $method) : Request { $this->method = $this->fixMethodCase($method); return $this; }
[ "public", "function", "setMethod", "(", "string", "$", "method", ")", ":", "Request", "{", "$", "this", "->", "method", "=", "$", "this", "->", "fixMethodCase", "(", "$", "method", ")", ";", "return", "$", "this", ";", "}" ]
Sets the request method. If the method case-insensitively matches a standard method, it will be converted to uppercase. @param string $method The new request method. @return static This request.
[ "Sets", "the", "request", "method", "." ]
1b185b0563d10f9f4293c254aa411545da00b597
https://github.com/brick/http/blob/1b185b0563d10f9f4293c254aa411545da00b597/src/Request.php#L585-L590
228,009
brick/http
src/Request.php
Request.fixMethodCase
private function fixMethodCase(string $method) : string { $upperMethod = strtoupper($method); $isStandard = in_array($upperMethod, self::$standardMethods, true); return $isStandard ? $upperMethod : $method; }
php
private function fixMethodCase(string $method) : string { $upperMethod = strtoupper($method); $isStandard = in_array($upperMethod, self::$standardMethods, true); return $isStandard ? $upperMethod : $method; }
[ "private", "function", "fixMethodCase", "(", "string", "$", "method", ")", ":", "string", "{", "$", "upperMethod", "=", "strtoupper", "(", "$", "method", ")", ";", "$", "isStandard", "=", "in_array", "(", "$", "upperMethod", ",", "self", "::", "$", "stan...
Fixes a method case. @see \Brick\Http\Request::$standardMethods @param string $method @return string
[ "Fixes", "a", "method", "case", "." ]
1b185b0563d10f9f4293c254aa411545da00b597
https://github.com/brick/http/blob/1b185b0563d10f9f4293c254aa411545da00b597/src/Request.php#L628-L634
228,010
brick/http
src/Request.php
Request.setScheme
public function setScheme(string $scheme) : Request { $scheme = strtolower($scheme); if ($scheme === 'http') { $this->isSecure = false; } elseif ($scheme === 'https') { $this->isSecure = true; } else { throw new \InvalidArgumentException('The sche...
php
public function setScheme(string $scheme) : Request { $scheme = strtolower($scheme); if ($scheme === 'http') { $this->isSecure = false; } elseif ($scheme === 'https') { $this->isSecure = true; } else { throw new \InvalidArgumentException('The sche...
[ "public", "function", "setScheme", "(", "string", "$", "scheme", ")", ":", "Request", "{", "$", "scheme", "=", "strtolower", "(", "$", "scheme", ")", ";", "if", "(", "$", "scheme", "===", "'http'", ")", "{", "$", "this", "->", "isSecure", "=", "false...
Sets the request scheme. @param string $scheme The new request scheme. @return static This request. @throws \InvalidArgumentException If the scheme is not http or https.
[ "Sets", "the", "request", "scheme", "." ]
1b185b0563d10f9f4293c254aa411545da00b597
https://github.com/brick/http/blob/1b185b0563d10f9f4293c254aa411545da00b597/src/Request.php#L655-L668
228,011
brick/http
src/Request.php
Request.isHost
public function isHost(string $host, bool $includeSubDomains = false) : bool { $thisHost = strtolower($this->host); $thatHost = strtolower($host); if (! $includeSubDomains) { return $thisHost === $thatHost; } $thisHost = explode('.', $thisHost); $thatHos...
php
public function isHost(string $host, bool $includeSubDomains = false) : bool { $thisHost = strtolower($this->host); $thatHost = strtolower($host); if (! $includeSubDomains) { return $thisHost === $thatHost; } $thisHost = explode('.', $thisHost); $thatHos...
[ "public", "function", "isHost", "(", "string", "$", "host", ",", "bool", "$", "includeSubDomains", "=", "false", ")", ":", "bool", "{", "$", "thisHost", "=", "strtolower", "(", "$", "this", "->", "host", ")", ";", "$", "thatHost", "=", "strtolower", "(...
Returns whether the host is on the given domain, or optionally on a sub-domain of it. @todo should be used against getUrl(), which should return a Url object. @param string $host @param bool $includeSubDomains @return bool
[ "Returns", "whether", "the", "host", "is", "on", "the", "given", "domain", "or", "optionally", "on", "a", "sub", "-", "domain", "of", "it", "." ]
1b185b0563d10f9f4293c254aa411545da00b597
https://github.com/brick/http/blob/1b185b0563d10f9f4293c254aa411545da00b597/src/Request.php#L702-L715
228,012
brick/http
src/Request.php
Request.updateHostHeader
private function updateHostHeader() : Request { $host = $this->host; $standardPort = $this->isSecure ? 443 : 80; if ($this->port !== $standardPort) { $host .= ':' . $this->port; } return $this->setHeader('Host', $host); }
php
private function updateHostHeader() : Request { $host = $this->host; $standardPort = $this->isSecure ? 443 : 80; if ($this->port !== $standardPort) { $host .= ':' . $this->port; } return $this->setHeader('Host', $host); }
[ "private", "function", "updateHostHeader", "(", ")", ":", "Request", "{", "$", "host", "=", "$", "this", "->", "host", ";", "$", "standardPort", "=", "$", "this", "->", "isSecure", "?", "443", ":", "80", ";", "if", "(", "$", "this", "->", "port", "...
Updates the Host header from the values of host and port. @return static This request.
[ "Updates", "the", "Host", "header", "from", "the", "values", "of", "host", "and", "port", "." ]
1b185b0563d10f9f4293c254aa411545da00b597
https://github.com/brick/http/blob/1b185b0563d10f9f4293c254aa411545da00b597/src/Request.php#L764-L774
228,013
brick/http
src/Request.php
Request.setPath
public function setPath(string $path) : Request { if (strpos($path, '?') !== false) { throw new \InvalidArgumentException('The request path must not contain a query string.'); } $this->path = $path; return $this->updateRequestUri(); }
php
public function setPath(string $path) : Request { if (strpos($path, '?') !== false) { throw new \InvalidArgumentException('The request path must not contain a query string.'); } $this->path = $path; return $this->updateRequestUri(); }
[ "public", "function", "setPath", "(", "string", "$", "path", ")", ":", "Request", "{", "if", "(", "strpos", "(", "$", "path", ",", "'?'", ")", "!==", "false", ")", "{", "throw", "new", "\\", "InvalidArgumentException", "(", "'The request path must not contai...
Sets the request path. Example: `/user/profile` @param string $path The new request path. @return static This request. @throws \InvalidArgumentException If the path is not valid.
[ "Sets", "the", "request", "path", "." ]
1b185b0563d10f9f4293c254aa411545da00b597
https://github.com/brick/http/blob/1b185b0563d10f9f4293c254aa411545da00b597/src/Request.php#L813-L822
228,014
brick/http
src/Request.php
Request.updateRequestUri
private function updateRequestUri() : Request { $this->requestUri = $this->path; if ($this->queryString !== '') { $this->requestUri .= '?' . $this->queryString; } return $this; }
php
private function updateRequestUri() : Request { $this->requestUri = $this->path; if ($this->queryString !== '') { $this->requestUri .= '?' . $this->queryString; } return $this; }
[ "private", "function", "updateRequestUri", "(", ")", ":", "Request", "{", "$", "this", "->", "requestUri", "=", "$", "this", "->", "path", ";", "if", "(", "$", "this", "->", "queryString", "!==", "''", ")", "{", "$", "this", "->", "requestUri", ".=", ...
Updates the request URI from the values of path and query string. @return static This request.
[ "Updates", "the", "request", "URI", "from", "the", "values", "of", "path", "and", "query", "string", "." ]
1b185b0563d10f9f4293c254aa411545da00b597
https://github.com/brick/http/blob/1b185b0563d10f9f4293c254aa411545da00b597/src/Request.php#L858-L867
228,015
brick/http
src/Request.php
Request.setRequestUri
public function setRequestUri(string $requestUri) : Request { $pos = strpos($requestUri, '?'); if ($pos === false) { $this->path = $requestUri; $this->queryString = ''; $this->query = []; } else { $this->path = substr($requestUri, 0, $p...
php
public function setRequestUri(string $requestUri) : Request { $pos = strpos($requestUri, '?'); if ($pos === false) { $this->path = $requestUri; $this->queryString = ''; $this->query = []; } else { $this->path = substr($requestUri, 0, $p...
[ "public", "function", "setRequestUri", "(", "string", "$", "requestUri", ")", ":", "Request", "{", "$", "pos", "=", "strpos", "(", "$", "requestUri", ",", "'?'", ")", ";", "if", "(", "$", "pos", "===", "false", ")", "{", "$", "this", "->", "path", ...
Sets the request URI. This will update the request path, query string, and query parameters. @param string $requestUri @return static
[ "Sets", "the", "request", "URI", "." ]
1b185b0563d10f9f4293c254aa411545da00b597
https://github.com/brick/http/blob/1b185b0563d10f9f4293c254aa411545da00b597/src/Request.php#L888-L910
228,016
brick/http
src/Request.php
Request.getUrlBase
public function getUrlBase() : string { $url = sprintf('%s://%s', $this->getScheme(), $this->host); $isStandardPort = ($this->port === ($this->isSecure ? 443 : 80)); return $isStandardPort ? $url : $url . ':' . $this->port; }
php
public function getUrlBase() : string { $url = sprintf('%s://%s', $this->getScheme(), $this->host); $isStandardPort = ($this->port === ($this->isSecure ? 443 : 80)); return $isStandardPort ? $url : $url . ':' . $this->port; }
[ "public", "function", "getUrlBase", "(", ")", ":", "string", "{", "$", "url", "=", "sprintf", "(", "'%s://%s'", ",", "$", "this", "->", "getScheme", "(", ")", ",", "$", "this", "->", "host", ")", ";", "$", "isStandardPort", "=", "(", "$", "this", "...
Returns the scheme and host name of this request. @return string The base URL.
[ "Returns", "the", "scheme", "and", "host", "name", "of", "this", "request", "." ]
1b185b0563d10f9f4293c254aa411545da00b597
https://github.com/brick/http/blob/1b185b0563d10f9f4293c254aa411545da00b597/src/Request.php#L927-L933
228,017
brick/http
src/Request.php
Request.setUrl
public function setUrl(string $url) : Request { $components = parse_url($url); if ($components === false) { throw new \InvalidArgumentException('The URL provided is not valid.'); } if (! isset($components['scheme'])) { throw new \InvalidArgumentException('Th...
php
public function setUrl(string $url) : Request { $components = parse_url($url); if ($components === false) { throw new \InvalidArgumentException('The URL provided is not valid.'); } if (! isset($components['scheme'])) { throw new \InvalidArgumentException('Th...
[ "public", "function", "setUrl", "(", "string", "$", "url", ")", ":", "Request", "{", "$", "components", "=", "parse_url", "(", "$", "url", ")", ";", "if", "(", "$", "components", "===", "false", ")", "{", "throw", "new", "\\", "InvalidArgumentException",...
Sets the request URL. @param string $url The new URL. @return static This request. @throws \InvalidArgumentException If the URL is not valid.
[ "Sets", "the", "request", "URL", "." ]
1b185b0563d10f9f4293c254aa411545da00b597
https://github.com/brick/http/blob/1b185b0563d10f9f4293c254aa411545da00b597/src/Request.php#L944-L998
228,018
brick/http
src/Request.php
Request.getReferer
public function getReferer() : ?Url { $referer = $this->getFirstHeader('Referer'); if ($referer === null) { return null; } try { return new Url($referer); } catch (\InvalidArgumentException $e) { return null; } }
php
public function getReferer() : ?Url { $referer = $this->getFirstHeader('Referer'); if ($referer === null) { return null; } try { return new Url($referer); } catch (\InvalidArgumentException $e) { return null; } }
[ "public", "function", "getReferer", "(", ")", ":", "?", "Url", "{", "$", "referer", "=", "$", "this", "->", "getFirstHeader", "(", "'Referer'", ")", ";", "if", "(", "$", "referer", "===", "null", ")", "{", "return", "null", ";", "}", "try", "{", "r...
Returns the Referer URL if it is present and valid, else null. @return Url|null
[ "Returns", "the", "Referer", "URL", "if", "it", "is", "present", "and", "valid", "else", "null", "." ]
1b185b0563d10f9f4293c254aa411545da00b597
https://github.com/brick/http/blob/1b185b0563d10f9f4293c254aa411545da00b597/src/Request.php#L1005-L1018
228,019
brick/http
src/Request.php
Request.setSecure
public function setSecure(bool $isSecure) : Request { $isStandardPort = ($this->port === ($this->isSecure ? 443 : 80)); if ($isStandardPort) { $this->port = $isSecure ? 443 : 80; } $this->isSecure = $isSecure; return $this; }
php
public function setSecure(bool $isSecure) : Request { $isStandardPort = ($this->port === ($this->isSecure ? 443 : 80)); if ($isStandardPort) { $this->port = $isSecure ? 443 : 80; } $this->isSecure = $isSecure; return $this; }
[ "public", "function", "setSecure", "(", "bool", "$", "isSecure", ")", ":", "Request", "{", "$", "isStandardPort", "=", "(", "$", "this", "->", "port", "===", "(", "$", "this", "->", "isSecure", "?", "443", ":", "80", ")", ")", ";", "if", "(", "$", ...
Sets whether this request is sent over a secure connection. @param bool $isSecure True to mark the request as secure, false to mark it as not secure. @return static This request.
[ "Sets", "whether", "this", "request", "is", "sent", "over", "a", "secure", "connection", "." ]
1b185b0563d10f9f4293c254aa411545da00b597
https://github.com/brick/http/blob/1b185b0563d10f9f4293c254aa411545da00b597/src/Request.php#L1037-L1048
228,020
brick/http
src/Request.php
Request.parseHeaderParameters
private function parseHeaderParameters(string $header) : array { $result = []; $values = explode(',', $header); foreach ($values as $parts) { $parameters = []; $parts = explode(';', $parts); $item = trim(array_shift($parts)); if ($item === ''...
php
private function parseHeaderParameters(string $header) : array { $result = []; $values = explode(',', $header); foreach ($values as $parts) { $parameters = []; $parts = explode(';', $parts); $item = trim(array_shift($parts)); if ($item === ''...
[ "private", "function", "parseHeaderParameters", "(", "string", "$", "header", ")", ":", "array", "{", "$", "result", "=", "[", "]", ";", "$", "values", "=", "explode", "(", "','", ",", "$", "header", ")", ";", "foreach", "(", "$", "values", "as", "$"...
Parses a header with multiple values and optional parameters. Example: text/html; charset=utf8, text/xml => ['text/html' => ['charset' => 'utf8'], 'text/xml' => []] @param string $header The header to parse. @return array An associative array of values and theirs parameters.
[ "Parses", "a", "header", "with", "multiple", "values", "and", "optional", "parameters", "." ]
1b185b0563d10f9f4293c254aa411545da00b597
https://github.com/brick/http/blob/1b185b0563d10f9f4293c254aa411545da00b597/src/Request.php#L1160-L1186
228,021
lawoole/framework
src/Support/Network.php
Network.getLocalHost
public static function getLocalHost() { if ($nets = swoole_get_local_ip()) { foreach ($nets as $net => $host) { if (self::isUsableHost($host)) { return $host; } } } return self::LOCAL_HOST; }
php
public static function getLocalHost() { if ($nets = swoole_get_local_ip()) { foreach ($nets as $net => $host) { if (self::isUsableHost($host)) { return $host; } } } return self::LOCAL_HOST; }
[ "public", "static", "function", "getLocalHost", "(", ")", "{", "if", "(", "$", "nets", "=", "swoole_get_local_ip", "(", ")", ")", "{", "foreach", "(", "$", "nets", "as", "$", "net", "=>", "$", "host", ")", "{", "if", "(", "self", "::", "isUsableHost"...
Get the local host ip. @return string
[ "Get", "the", "local", "host", "ip", "." ]
ac701a76f5d37c81273b7202ba37094766cb5dfe
https://github.com/lawoole/framework/blob/ac701a76f5d37c81273b7202ba37094766cb5dfe/src/Support/Network.php#L21-L32
228,022
gggeek/ggwebservices
classes/ggphpsoapserver.php
ggPhpSOAPServer.processRequest
function processRequest() { $namespaceURI = 'unknown_namespace_uri'; /// @todo dechunk, correct encoding, check for supported /// http features of the client, etc... $data = $this->RawPostData; $data = $this->inflateRequest( $data ); if ( $data === false ) ...
php
function processRequest() { $namespaceURI = 'unknown_namespace_uri'; /// @todo dechunk, correct encoding, check for supported /// http features of the client, etc... $data = $this->RawPostData; $data = $this->inflateRequest( $data ); if ( $data === false ) ...
[ "function", "processRequest", "(", ")", "{", "$", "namespaceURI", "=", "'unknown_namespace_uri'", ";", "/// @todo dechunk, correct encoding, check for supported\r", "/// http features of the client, etc...\r", "$", "data", "=", "$", "this", "->", "RawPostData", ";", "$", "d...
Reimplemented, because we do not recover params in the request obj
[ "Reimplemented", "because", "we", "do", "not", "recover", "params", "in", "the", "request", "obj" ]
4f6e1ada1aa94301acd2ef3cd0966c7be06313ec
https://github.com/gggeek/ggwebservices/blob/4f6e1ada1aa94301acd2ef3cd0966c7be06313ec/classes/ggphpsoapserver.php#L66-L96
228,023
tomwalder/php-appengine-search
src/Search/Index.php
Index.put
public function put($docs) { if($docs instanceof Document) { $this->obj_gateway->put([$docs]); } elseif (is_array($docs)) { $this->obj_gateway->put($docs); } else { throw new \InvalidArgumentException('Parameter must be one or more \Search\Document objects...
php
public function put($docs) { if($docs instanceof Document) { $this->obj_gateway->put([$docs]); } elseif (is_array($docs)) { $this->obj_gateway->put($docs); } else { throw new \InvalidArgumentException('Parameter must be one or more \Search\Document objects...
[ "public", "function", "put", "(", "$", "docs", ")", "{", "if", "(", "$", "docs", "instanceof", "Document", ")", "{", "$", "this", "->", "obj_gateway", "->", "put", "(", "[", "$", "docs", "]", ")", ";", "}", "elseif", "(", "is_array", "(", "$", "d...
Put a document into the index @param Document|Document[] $docs
[ "Put", "a", "document", "into", "the", "index" ]
e34a7f6ddf2f5e8dc51487562d413ca4fd1331ba
https://github.com/tomwalder/php-appengine-search/blob/e34a7f6ddf2f5e8dc51487562d413ca4fd1331ba/src/Search/Index.php#L46-L55
228,024
tomwalder/php-appengine-search
src/Search/Index.php
Index.search
public function search($query) { if($query instanceof Query) { return $this->obj_gateway->search($query); } return $this->obj_gateway->search(new Query((string)$query)); }
php
public function search($query) { if($query instanceof Query) { return $this->obj_gateway->search($query); } return $this->obj_gateway->search(new Query((string)$query)); }
[ "public", "function", "search", "(", "$", "query", ")", "{", "if", "(", "$", "query", "instanceof", "Query", ")", "{", "return", "$", "this", "->", "obj_gateway", "->", "search", "(", "$", "query", ")", ";", "}", "return", "$", "this", "->", "obj_gat...
Run a basic search query Support simple query strings OR Query objects @param $query @return object
[ "Run", "a", "basic", "search", "query" ]
e34a7f6ddf2f5e8dc51487562d413ca4fd1331ba
https://github.com/tomwalder/php-appengine-search/blob/e34a7f6ddf2f5e8dc51487562d413ca4fd1331ba/src/Search/Index.php#L65-L71
228,025
tomwalder/php-appengine-search
src/Search/Index.php
Index.delete
public function delete($docs) { if($docs instanceof Document) { $this->obj_gateway->delete([$docs->getId()]); } elseif (is_string($docs)) { $this->obj_gateway->delete([$docs]); } elseif (is_array($docs)) { $arr_doc_ids = []; foreach($docs as $d...
php
public function delete($docs) { if($docs instanceof Document) { $this->obj_gateway->delete([$docs->getId()]); } elseif (is_string($docs)) { $this->obj_gateway->delete([$docs]); } elseif (is_array($docs)) { $arr_doc_ids = []; foreach($docs as $d...
[ "public", "function", "delete", "(", "$", "docs", ")", "{", "if", "(", "$", "docs", "instanceof", "Document", ")", "{", "$", "this", "->", "obj_gateway", "->", "delete", "(", "[", "$", "docs", "->", "getId", "(", ")", "]", ")", ";", "}", "elseif", ...
Delete one or more documents @param $docs
[ "Delete", "one", "or", "more", "documents" ]
e34a7f6ddf2f5e8dc51487562d413ca4fd1331ba
https://github.com/tomwalder/php-appengine-search/blob/e34a7f6ddf2f5e8dc51487562d413ca4fd1331ba/src/Search/Index.php#L89-L110
228,026
antaresproject/core
src/foundation/src/Console/Commands/CoreAclCommand.php
CoreAclCommand.getActions
private function getActions(Component $component) { $defaultActions = (array) config('antares/installer::permissions.components.' . $component->name, []); return Action::where('component_id', $component->id)->whereIn('name', $defaultActions)->get(); }
php
private function getActions(Component $component) { $defaultActions = (array) config('antares/installer::permissions.components.' . $component->name, []); return Action::where('component_id', $component->id)->whereIn('name', $defaultActions)->get(); }
[ "private", "function", "getActions", "(", "Component", "$", "component", ")", "{", "$", "defaultActions", "=", "(", "array", ")", "config", "(", "'antares/installer::permissions.components.'", ".", "$", "component", "->", "name", ",", "[", "]", ")", ";", "retu...
Returns actions for the given component. @param Component $component @return Action[]
[ "Returns", "actions", "for", "the", "given", "component", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Console/Commands/CoreAclCommand.php#L56-L60
228,027
gggeek/ggwebservices
classes/gghttprequest.php
ggHTTPRequest._payload
protected function _payload() { $results = array(); foreach( $this->Parameters as $key => $val ) { if ( is_array( $val ) ) { foreach ( $val as $vkey => $vval ) { $results[] = urlencode( $key ) . '[' . urlencode( $vke...
php
protected function _payload() { $results = array(); foreach( $this->Parameters as $key => $val ) { if ( is_array( $val ) ) { foreach ( $val as $vkey => $vval ) { $results[] = urlencode( $key ) . '[' . urlencode( $vke...
[ "protected", "function", "_payload", "(", ")", "{", "$", "results", "=", "array", "(", ")", ";", "foreach", "(", "$", "this", "->", "Parameters", "as", "$", "key", "=>", "$", "val", ")", "{", "if", "(", "is_array", "(", "$", "val", ")", ")", "{",...
the payload can be used in URIS for GETs and in http req bodies for POSTs @todo add support for array params
[ "the", "payload", "can", "be", "used", "in", "URIS", "for", "GETs", "and", "in", "http", "req", "bodies", "for", "POSTs" ]
4f6e1ada1aa94301acd2ef3cd0966c7be06313ec
https://github.com/gggeek/ggwebservices/blob/4f6e1ada1aa94301acd2ef3cd0966c7be06313ec/classes/gghttprequest.php#L35-L53
228,028
antaresproject/core
src/components/view/src/Notification/NotificationHandler.php
NotificationHandler.handle
public function handle(AbstractNotificationTemplate $instance) { $type = $instance->getType(); $notifier = $this->getNotifierAdapter($type); if (!$notifier) { return false; } $render = $instance->render(); $view = $render instanceof View ? $...
php
public function handle(AbstractNotificationTemplate $instance) { $type = $instance->getType(); $notifier = $this->getNotifierAdapter($type); if (!$notifier) { return false; } $render = $instance->render(); $view = $render instanceof View ? $...
[ "public", "function", "handle", "(", "AbstractNotificationTemplate", "$", "instance", ")", "{", "$", "type", "=", "$", "instance", "->", "getType", "(", ")", ";", "$", "notifier", "=", "$", "this", "->", "getNotifierAdapter", "(", "$", "type", ")", ";", ...
handle notification event @param Notification $instance
[ "handle", "notification", "event" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/view/src/Notification/NotificationHandler.php#L37-L53
228,029
antaresproject/core
src/components/view/src/Notification/NotificationHandler.php
NotificationHandler.getNotifierAdapter
public function getNotifierAdapter($type) { try { $config = config("antares/notifier::{$type}"); $notifierConfig = $config['adapters'][$config['adapters']['default']]; if (!class_exists($notifierConfig['model'])) { throw new Exception(sprintf('Noti...
php
public function getNotifierAdapter($type) { try { $config = config("antares/notifier::{$type}"); $notifierConfig = $config['adapters'][$config['adapters']['default']]; if (!class_exists($notifierConfig['model'])) { throw new Exception(sprintf('Noti...
[ "public", "function", "getNotifierAdapter", "(", "$", "type", ")", "{", "try", "{", "$", "config", "=", "config", "(", "\"antares/notifier::{$type}\"", ")", ";", "$", "notifierConfig", "=", "$", "config", "[", "'adapters'", "]", "[", "$", "config", "[", "'...
gets notifier adapter by type @param String $type @return boolean @throws Exception
[ "gets", "notifier", "adapter", "by", "type" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/view/src/Notification/NotificationHandler.php#L62-L77
228,030
joomla-framework/google-api
src/Data/Adsense.php
Adsense.getAccount
public function getAccount($accountID, $subaccounts = true) { if ($this->isAuthenticated()) { $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . urlencode($accountID) . ($subaccounts ? '?tree=true' : ''); $jdata = $this->query($url); if ($data = json_decode($jdata->body, true)) { retur...
php
public function getAccount($accountID, $subaccounts = true) { if ($this->isAuthenticated()) { $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . urlencode($accountID) . ($subaccounts ? '?tree=true' : ''); $jdata = $this->query($url); if ($data = json_decode($jdata->body, true)) { retur...
[ "public", "function", "getAccount", "(", "$", "accountID", ",", "$", "subaccounts", "=", "true", ")", "{", "if", "(", "$", "this", "->", "isAuthenticated", "(", ")", ")", "{", "$", "url", "=", "'https://www.googleapis.com/adsense/v1.1/accounts/'", ".", "urlenc...
Method to get an Adsense account's settings from Google @param string $accountID ID of account to get @param boolean $subaccounts Include list of subaccounts @return mixed Data from Google @since 1.0 @throws UnexpectedValueException
[ "Method", "to", "get", "an", "Adsense", "account", "s", "settings", "from", "Google" ]
c78f06cfaba3f0dfc3ce411a335b417a5f0ee904
https://github.com/joomla-framework/google-api/blob/c78f06cfaba3f0dfc3ce411a335b417a5f0ee904/src/Data/Adsense.php#L55-L71
228,031
joomla-framework/google-api
src/Data/Adsense.php
Adsense.listAccounts
public function listAccounts($options = array(), $maxpages = 1) { if ($this->isAuthenticated()) { $next = array_key_exists('nextPageToken', $options) ? $options['nextPage'] : null; unset($options['nextPageToken']); $url = 'https://www.googleapis.com/adsense/v1.1/accounts?' . http_build_query($options); ...
php
public function listAccounts($options = array(), $maxpages = 1) { if ($this->isAuthenticated()) { $next = array_key_exists('nextPageToken', $options) ? $options['nextPage'] : null; unset($options['nextPageToken']); $url = 'https://www.googleapis.com/adsense/v1.1/accounts?' . http_build_query($options); ...
[ "public", "function", "listAccounts", "(", "$", "options", "=", "array", "(", ")", ",", "$", "maxpages", "=", "1", ")", "{", "if", "(", "$", "this", "->", "isAuthenticated", "(", ")", ")", "{", "$", "next", "=", "array_key_exists", "(", "'nextPageToken...
Method to retrieve a list of AdSense accounts from Google @param array $options Search settings @param integer $maxpages Maximum number of pages of accounts to return @return mixed Data from Google @since 1.0 @throws UnexpectedValueException
[ "Method", "to", "retrieve", "a", "list", "of", "AdSense", "accounts", "from", "Google" ]
c78f06cfaba3f0dfc3ce411a335b417a5f0ee904
https://github.com/joomla-framework/google-api/blob/c78f06cfaba3f0dfc3ce411a335b417a5f0ee904/src/Data/Adsense.php#L84-L96
228,032
joomla-framework/google-api
src/Data/Adsense.php
Adsense.listClients
public function listClients($accountID, $options = array(), $maxpages = 1) { if ($this->isAuthenticated()) { $next = array_key_exists('nextPageToken', $options) ? $options['nextPage'] : null; unset($options['nextPageToken']); $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . urlencode($accountI...
php
public function listClients($accountID, $options = array(), $maxpages = 1) { if ($this->isAuthenticated()) { $next = array_key_exists('nextPageToken', $options) ? $options['nextPage'] : null; unset($options['nextPageToken']); $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . urlencode($accountI...
[ "public", "function", "listClients", "(", "$", "accountID", ",", "$", "options", "=", "array", "(", ")", ",", "$", "maxpages", "=", "1", ")", "{", "if", "(", "$", "this", "->", "isAuthenticated", "(", ")", ")", "{", "$", "next", "=", "array_key_exist...
Method to retrieve a list of AdSense clients from Google @param string $accountID ID of account to list the clients from @param array $options Search settings @param integer $maxpages Maximum number of pages of accounts to return @return mixed Data from Google @since 1.0 @throws UnexpectedValu...
[ "Method", "to", "retrieve", "a", "list", "of", "AdSense", "clients", "from", "Google" ]
c78f06cfaba3f0dfc3ce411a335b417a5f0ee904
https://github.com/joomla-framework/google-api/blob/c78f06cfaba3f0dfc3ce411a335b417a5f0ee904/src/Data/Adsense.php#L110-L122
228,033
joomla-framework/google-api
src/Data/Adsense.php
Adsense.getUnit
public function getUnit($accountID, $adclientID, $adunitID) { if ($this->isAuthenticated()) { $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . urlencode($accountID); $url .= '/adclients/' . urlencode($adclientID) . '/adunits/' . urlencode($adunitID); $jdata = $this->query($url); if ($data ...
php
public function getUnit($accountID, $adclientID, $adunitID) { if ($this->isAuthenticated()) { $url = 'https://www.googleapis.com/adsense/v1.1/accounts/' . urlencode($accountID); $url .= '/adclients/' . urlencode($adclientID) . '/adunits/' . urlencode($adunitID); $jdata = $this->query($url); if ($data ...
[ "public", "function", "getUnit", "(", "$", "accountID", ",", "$", "adclientID", ",", "$", "adunitID", ")", "{", "if", "(", "$", "this", "->", "isAuthenticated", "(", ")", ")", "{", "$", "url", "=", "'https://www.googleapis.com/adsense/v1.1/accounts/'", ".", ...
Method to get an AdSense AdUnit @param string $accountID ID of account to get @param string $adclientID ID of client to get @param string $adunitID ID of adunit to get @return mixed Data from Google @since 1.0 @throws UnexpectedValueException
[ "Method", "to", "get", "an", "AdSense", "AdUnit" ]
c78f06cfaba3f0dfc3ce411a335b417a5f0ee904
https://github.com/joomla-framework/google-api/blob/c78f06cfaba3f0dfc3ce411a335b417a5f0ee904/src/Data/Adsense.php#L136-L153
228,034
joomla-framework/google-api
src/Data/Adsense.php
Adsense.generateReport
public function generateReport($accountID, $start, $end = false, $options = array(), $maxpages = 1) { if ($this->isAuthenticated()) { if (\is_int($start)) { $startobj = new DateTime; $startobj->setTimestamp($start); } elseif (\is_string($start)) { $startobj = new DateTime($start); } ...
php
public function generateReport($accountID, $start, $end = false, $options = array(), $maxpages = 1) { if ($this->isAuthenticated()) { if (\is_int($start)) { $startobj = new DateTime; $startobj->setTimestamp($start); } elseif (\is_string($start)) { $startobj = new DateTime($start); } ...
[ "public", "function", "generateReport", "(", "$", "accountID", ",", "$", "start", ",", "$", "end", "=", "false", ",", "$", "options", "=", "array", "(", ")", ",", "$", "maxpages", "=", "1", ")", "{", "if", "(", "$", "this", "->", "isAuthenticated", ...
Method to retrieve a list of AdSense Channel URLs @param string $accountID ID of account @param mixed $start Start day @param mixed $end End day @param array $options Search settings @param integer $maxpages Maximum number of pages of accounts to return @return mixed Data fro...
[ "Method", "to", "retrieve", "a", "list", "of", "AdSense", "Channel", "URLs" ]
c78f06cfaba3f0dfc3ce411a335b417a5f0ee904
https://github.com/joomla-framework/google-api/blob/c78f06cfaba3f0dfc3ce411a335b417a5f0ee904/src/Data/Adsense.php#L315-L398
228,035
akramfares/rundeck-sdk-php
src/Resources/Resource.php
Resource.get
public function get($action, $alt = "xml") { if (array_key_exists($action, $this->actions)) { if (!in_array($alt, $this->actions[$action])) { throw new \Exception("Invalid Format: ". $alt); } $response = $this->client->get('/'. strtolower(get_class($this))...
php
public function get($action, $alt = "xml") { if (array_key_exists($action, $this->actions)) { if (!in_array($alt, $this->actions[$action])) { throw new \Exception("Invalid Format: ". $alt); } $response = $this->client->get('/'. strtolower(get_class($this))...
[ "public", "function", "get", "(", "$", "action", ",", "$", "alt", "=", "\"xml\"", ")", "{", "if", "(", "array_key_exists", "(", "$", "action", ",", "$", "this", "->", "actions", ")", ")", "{", "if", "(", "!", "in_array", "(", "$", "alt", ",", "$"...
Get resource action @param $action @param string $alt xml|json @return array @throws \Exception
[ "Get", "resource", "action" ]
6a806c2830787b875dc8033e5c6883cbcb4b5abd
https://github.com/akramfares/rundeck-sdk-php/blob/6a806c2830787b875dc8033e5c6883cbcb4b5abd/src/Resources/Resource.php#L32-L43
228,036
joomla-framework/google-api
src/Data/Picasa.php
Picasa.listAlbums
public function listAlbums($userID = 'default') { if ($this->isAuthenticated()) { $url = 'https://picasaweb.google.com/data/feed/api/user/' . urlencode($userID); $jdata = $this->query($url, null, array('GData-Version' => 2)); $xml = $this->safeXml($jdata->body); if (isset($xml->children()->entry))...
php
public function listAlbums($userID = 'default') { if ($this->isAuthenticated()) { $url = 'https://picasaweb.google.com/data/feed/api/user/' . urlencode($userID); $jdata = $this->query($url, null, array('GData-Version' => 2)); $xml = $this->safeXml($jdata->body); if (isset($xml->children()->entry))...
[ "public", "function", "listAlbums", "(", "$", "userID", "=", "'default'", ")", "{", "if", "(", "$", "this", "->", "isAuthenticated", "(", ")", ")", "{", "$", "url", "=", "'https://picasaweb.google.com/data/feed/api/user/'", ".", "urlencode", "(", "$", "userID"...
Method to retrieve a list of Picasa Albums @param string $userID ID of user @return mixed Data from Google @since 1.0 @throws \UnexpectedValueException
[ "Method", "to", "retrieve", "a", "list", "of", "Picasa", "Albums" ]
c78f06cfaba3f0dfc3ce411a335b417a5f0ee904
https://github.com/joomla-framework/google-api/blob/c78f06cfaba3f0dfc3ce411a335b417a5f0ee904/src/Data/Picasa.php#L51-L75
228,037
joomla-framework/google-api
src/Data/Picasa.php
Picasa.createAlbum
public function createAlbum($userID = 'default', $title = '', $access = 'private', $summary = '', $location = '', $time = false, $keywords = array() ) { if ($this->isAuthenticated()) { $time = $time ? $time : time(); $title = $title != '' ? $title : date('F j, Y'); $xml = new \SimpleXMLElement('<ent...
php
public function createAlbum($userID = 'default', $title = '', $access = 'private', $summary = '', $location = '', $time = false, $keywords = array() ) { if ($this->isAuthenticated()) { $time = $time ? $time : time(); $title = $title != '' ? $title : date('F j, Y'); $xml = new \SimpleXMLElement('<ent...
[ "public", "function", "createAlbum", "(", "$", "userID", "=", "'default'", ",", "$", "title", "=", "''", ",", "$", "access", "=", "'private'", ",", "$", "summary", "=", "''", ",", "$", "location", "=", "''", ",", "$", "time", "=", "false", ",", "$"...
Method to create a Picasa Album @param string $userID ID of user @param string $title New album title @param string $access New album access settings @param string $summary New album summary @param string $location New album location @param integer $time New album timestamp @pa...
[ "Method", "to", "create", "a", "Picasa", "Album" ]
c78f06cfaba3f0dfc3ce411a335b417a5f0ee904
https://github.com/joomla-framework/google-api/blob/c78f06cfaba3f0dfc3ce411a335b417a5f0ee904/src/Data/Picasa.php#L92-L122
228,038
antaresproject/core
src/components/support/src/Support/Manager.php
Manager.getDriverName
protected function getDriverName($driverName) { if (false === strpos($driverName, '.')) { $driverName = "{$driverName}.default"; } list($driver, $name) = explode('.', $driverName, 2); $this->checkNameIsNotBlacklisted($name); return [$driver, $name]; }
php
protected function getDriverName($driverName) { if (false === strpos($driverName, '.')) { $driverName = "{$driverName}.default"; } list($driver, $name) = explode('.', $driverName, 2); $this->checkNameIsNotBlacklisted($name); return [$driver, $name]; }
[ "protected", "function", "getDriverName", "(", "$", "driverName", ")", "{", "if", "(", "false", "===", "strpos", "(", "$", "driverName", ",", "'.'", ")", ")", "{", "$", "driverName", "=", "\"{$driverName}.default\"", ";", "}", "list", "(", "$", "driver", ...
Get driver name. @param string $driverName @return array
[ "Get", "driver", "name", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/support/src/Support/Manager.php#L90-L102
228,039
antaresproject/core
src/utils/asset/src/AssetPublisher.php
AssetPublisher.getFiles
protected function getFiles($specified) { $specified = (array) $specified; if (php_sapi_name() === 'cli') { return []; } if ($this->extension === null) { return []; } $path = $this->extensionsManager->getExtensionPathByName($this->extension)...
php
protected function getFiles($specified) { $specified = (array) $specified; if (php_sapi_name() === 'cli') { return []; } if ($this->extension === null) { return []; } $path = $this->extensionsManager->getExtensionPathByName($this->extension)...
[ "protected", "function", "getFiles", "(", "$", "specified", ")", "{", "$", "specified", "=", "(", "array", ")", "$", "specified", ";", "if", "(", "php_sapi_name", "(", ")", "===", "'cli'", ")", "{", "return", "[", "]", ";", "}", "if", "(", "$", "th...
get files to publish @param array $specified @return array
[ "get", "files", "to", "publish" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/utils/asset/src/AssetPublisher.php#L98-L135
228,040
antaresproject/core
src/utils/asset/src/AssetPublisher.php
AssetPublisher.publishAndPropagate
public function publishAndPropagate(array $files = array(), $extension = null, $before = []) { $container = $this->assetFactory->container($this->position); $applicationContainer = $this->assetFactory->container('antares/foundation::application'); if (empty($files)) { ...
php
public function publishAndPropagate(array $files = array(), $extension = null, $before = []) { $container = $this->assetFactory->container($this->position); $applicationContainer = $this->assetFactory->container('antares/foundation::application'); if (empty($files)) { ...
[ "public", "function", "publishAndPropagate", "(", "array", "$", "files", "=", "array", "(", ")", ",", "$", "extension", "=", "null", ",", "$", "before", "=", "[", "]", ")", "{", "$", "container", "=", "$", "this", "->", "assetFactory", "->", "container...
creates symlink as publish and attaches to asset container @param array $files @param String $extension @param array $before @return Asset
[ "creates", "symlink", "as", "publish", "and", "attaches", "to", "asset", "container" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/utils/asset/src/AssetPublisher.php#L145-L182
228,041
antaresproject/core
src/utils/asset/src/AssetPublisher.php
AssetPublisher.publish
public function publish($extension, $options = null, $before = []) { $files = $this->files($extension, $options, $before); return $this->publishAndPropagate($files, null, $before); }
php
public function publish($extension, $options = null, $before = []) { $files = $this->files($extension, $options, $before); return $this->publishAndPropagate($files, null, $before); }
[ "public", "function", "publish", "(", "$", "extension", ",", "$", "options", "=", "null", ",", "$", "before", "=", "[", "]", ")", "{", "$", "files", "=", "$", "this", "->", "files", "(", "$", "extension", ",", "$", "options", ",", "$", "before", ...
publish assets depends on extension name @param String $extension @param mixed $options @param array $before @return Asset
[ "publish", "assets", "depends", "on", "extension", "name" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/utils/asset/src/AssetPublisher.php#L245-L249
228,042
antaresproject/core
src/foundation/src/Traits/PackageValidationTrait.php
PackageValidationTrait.parsePackage
protected function parsePackage($attribute, UploadedFile $value, $parameters) { $name = $value->getClientOriginalName(); $this->directory = $directory = $value->directory; $this->filename = $filename = $value->filename; $this->extension = $extension = F...
php
protected function parsePackage($attribute, UploadedFile $value, $parameters) { $name = $value->getClientOriginalName(); $this->directory = $directory = $value->directory; $this->filename = $filename = $value->filename; $this->extension = $extension = F...
[ "protected", "function", "parsePackage", "(", "$", "attribute", ",", "UploadedFile", "$", "value", ",", "$", "parameters", ")", "{", "$", "name", "=", "$", "value", "->", "getClientOriginalName", "(", ")", ";", "$", "this", "->", "directory", "=", "$", "...
parse uploaded package @param array | string $attribute @param \Symfony\Component\HttpFoundation\File\UploadedFile $value @param array | string $parameters
[ "parse", "uploaded", "package" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Traits/PackageValidationTrait.php#L85-L112
228,043
antaresproject/core
src/foundation/src/Traits/PackageValidationTrait.php
PackageValidationTrait.deleteTemporaries
private function deleteTemporaries($directory) { if (is_dir($directory)) { $fileSystem = new Filesystem(); $fileSystem->deleteDirectory($directory, false); } $this->manifest = null; return true; }
php
private function deleteTemporaries($directory) { if (is_dir($directory)) { $fileSystem = new Filesystem(); $fileSystem->deleteDirectory($directory, false); } $this->manifest = null; return true; }
[ "private", "function", "deleteTemporaries", "(", "$", "directory", ")", "{", "if", "(", "is_dir", "(", "$", "directory", ")", ")", "{", "$", "fileSystem", "=", "new", "Filesystem", "(", ")", ";", "$", "fileSystem", "->", "deleteDirectory", "(", "$", "dir...
deletes temporary uploaded files @param String $directory @param String $filename @return boolean
[ "deletes", "temporary", "uploaded", "files" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Traits/PackageValidationTrait.php#L121-L129
228,044
antaresproject/core
src/foundation/src/Traits/PackageValidationTrait.php
PackageValidationTrait.failure
protected function failure($attribute, $message = null) { $this->deleteTemporaries($this->directory); $this->setCustomMessages([$attribute => trans($message)]); $this->addFailure($attribute, $attribute, []); return false; }
php
protected function failure($attribute, $message = null) { $this->deleteTemporaries($this->directory); $this->setCustomMessages([$attribute => trans($message)]); $this->addFailure($attribute, $attribute, []); return false; }
[ "protected", "function", "failure", "(", "$", "attribute", ",", "$", "message", "=", "null", ")", "{", "$", "this", "->", "deleteTemporaries", "(", "$", "this", "->", "directory", ")", ";", "$", "this", "->", "setCustomMessages", "(", "[", "$", "attribut...
failure validation, add custom messages @param array | String $attribute @param String $message @return boolean
[ "failure", "validation", "add", "custom", "messages" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Traits/PackageValidationTrait.php#L148-L154
228,045
antaresproject/core
src/utils/form/src/Controls/CheckboxType.php
CheckboxType.setChecked
public function setChecked(bool $checked) { $this->value = $checked ? $this->getCheckedValue() : $this->getUncheckedValue(); return $this; }
php
public function setChecked(bool $checked) { $this->value = $checked ? $this->getCheckedValue() : $this->getUncheckedValue(); return $this; }
[ "public", "function", "setChecked", "(", "bool", "$", "checked", ")", "{", "$", "this", "->", "value", "=", "$", "checked", "?", "$", "this", "->", "getCheckedValue", "(", ")", ":", "$", "this", "->", "getUncheckedValue", "(", ")", ";", "return", "$", ...
Checks or unchecks the checkbox @param bool $checked @return CheckboxType
[ "Checks", "or", "unchecks", "the", "checkbox" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/utils/form/src/Controls/CheckboxType.php#L62-L66
228,046
antaresproject/core
src/foundation/src/Notifications/Variables/CoreVariablesProvider.php
CoreVariablesProvider.applyVariables
public function applyVariables(ModuleVariables $moduleVariables) : void { $moduleVariables ->modelDefinition('user', User::class, self::defaultUser()) ->setAttributes([ 'id' => 'ID', 'email' => 'Email', 'firstname' => 'First Name...
php
public function applyVariables(ModuleVariables $moduleVariables) : void { $moduleVariables ->modelDefinition('user', User::class, self::defaultUser()) ->setAttributes([ 'id' => 'ID', 'email' => 'Email', 'firstname' => 'First Name...
[ "public", "function", "applyVariables", "(", "ModuleVariables", "$", "moduleVariables", ")", ":", "void", "{", "$", "moduleVariables", "->", "modelDefinition", "(", "'user'", ",", "User", "::", "class", ",", "self", "::", "defaultUser", "(", ")", ")", "->", ...
Applies the variables to the module container. @param ModuleVariables $moduleVariables
[ "Applies", "the", "variables", "to", "the", "module", "container", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Notifications/Variables/CoreVariablesProvider.php#L20-L51
228,047
antaresproject/core
src/components/html/src/HtmlServiceProvider.php
HtmlServiceProvider.registerAntaresFormBuilder
protected function registerAntaresFormBuilder() { $this->app->singleton('Antares\Contracts\Html\Form\Control', 'Antares\Html\Form\Control'); $this->app->singleton('Antares\Contracts\Html\Form\Template', function ($app) { $class = $app->make('config')->get('antares/html::form.presenter',...
php
protected function registerAntaresFormBuilder() { $this->app->singleton('Antares\Contracts\Html\Form\Control', 'Antares\Html\Form\Control'); $this->app->singleton('Antares\Contracts\Html\Form\Template', function ($app) { $class = $app->make('config')->get('antares/html::form.presenter',...
[ "protected", "function", "registerAntaresFormBuilder", "(", ")", "{", "$", "this", "->", "app", "->", "singleton", "(", "'Antares\\Contracts\\Html\\Form\\Control'", ",", "'Antares\\Html\\Form\\Control'", ")", ";", "$", "this", "->", "app", "->", "singleton", "(", "'...
Register the Antares\Form builder instance. @return void
[ "Register", "the", "Antares", "\\", "Form", "builder", "instance", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/html/src/HtmlServiceProvider.php#L104-L117
228,048
antaresproject/core
src/components/html/src/Form/Fieldset.php
Fieldset.customfield
public function customfield($grid, $name) { if (!extension_active('customfields')) { return; } $category = strtolower(last(explode('\\', get_class($grid->row)))); $customfields = app('customfields')->get(); foreach ($customfields as $classname => $fields) { ...
php
public function customfield($grid, $name) { if (!extension_active('customfields')) { return; } $category = strtolower(last(explode('\\', get_class($grid->row)))); $customfields = app('customfields')->get(); foreach ($customfields as $classname => $fields) { ...
[ "public", "function", "customfield", "(", "$", "grid", ",", "$", "name", ")", "{", "if", "(", "!", "extension_active", "(", "'customfields'", ")", ")", "{", "return", ";", "}", "$", "category", "=", "strtolower", "(", "last", "(", "explode", "(", "'\\\...
Add customfield to form @param Grid $grid @param String $name
[ "Add", "customfield", "to", "form" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/html/src/Form/Fieldset.php#L217-L245
228,049
antaresproject/core
src/components/html/src/Form/Fieldset.php
Fieldset.addCustomfield
protected function addCustomfield($grid, $field) { if (!$field instanceof \Antares\Customfield\CustomField) { $customfield = with(new \Antares\Customfield\CustomField())->attributes($field); } else { $customfield = $field; } $customfield->setModel($grid->row);...
php
protected function addCustomfield($grid, $field) { if (!$field instanceof \Antares\Customfield\CustomField) { $customfield = with(new \Antares\Customfield\CustomField())->attributes($field); } else { $customfield = $field; } $customfield->setModel($grid->row);...
[ "protected", "function", "addCustomfield", "(", "$", "grid", ",", "$", "field", ")", "{", "if", "(", "!", "$", "field", "instanceof", "\\", "Antares", "\\", "Customfield", "\\", "CustomField", ")", "{", "$", "customfield", "=", "with", "(", "new", "\\", ...
Add single customfield @param Grid $grid @param \Antares\Customfield\CustomField $field
[ "Add", "single", "customfield" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/html/src/Form/Fieldset.php#L253-L270
228,050
antaresproject/core
src/components/html/src/Form/Fieldset.php
Fieldset.customfieldsByFieldset
public function customfieldsByFieldset($grid, $name) { if (!extension_active('customfields')) { return; } $customfields = app('customfields')->get(); $items = []; $reserved = []; foreach ($customfields as $classname => $fields) { if ...
php
public function customfieldsByFieldset($grid, $name) { if (!extension_active('customfields')) { return; } $customfields = app('customfields')->get(); $items = []; $reserved = []; foreach ($customfields as $classname => $fields) { if ...
[ "public", "function", "customfieldsByFieldset", "(", "$", "grid", ",", "$", "name", ")", "{", "if", "(", "!", "extension_active", "(", "'customfields'", ")", ")", "{", "return", ";", "}", "$", "customfields", "=", "app", "(", "'customfields'", ")", "->", ...
Adds customfields by fieldset name @param Grid $grid @param String $name @return $this
[ "Adds", "customfields", "by", "fieldset", "name" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/html/src/Form/Fieldset.php#L279-L315
228,051
antaresproject/core
src/components/html/src/Form/Fieldset.php
Fieldset.add
public function add(Field $control) { $renderable = $control instanceof \Illuminate\Contracts\Support\Renderable; $control->setField(function ($row, $cont, $templates) use ($control, $renderable) { $control = app(Control::class) ->setTemplates($this->control->getTe...
php
public function add(Field $control) { $renderable = $control instanceof \Illuminate\Contracts\Support\Renderable; $control->setField(function ($row, $cont, $templates) use ($control, $renderable) { $control = app(Control::class) ->setTemplates($this->control->getTe...
[ "public", "function", "add", "(", "Field", "$", "control", ")", "{", "$", "renderable", "=", "$", "control", "instanceof", "\\", "Illuminate", "\\", "Contracts", "\\", "Support", "\\", "Renderable", ";", "$", "control", "->", "setField", "(", "function", "...
Add control to controls collection @param \Antares\Html\Form\Field $control @return $this
[ "Add", "control", "to", "controls", "collection" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/html/src/Form/Fieldset.php#L335-L361
228,052
antaresproject/core
src/components/html/src/Form/Fieldset.php
Fieldset.detachControl
public function detachControl(FieldContract $control) { $name = $control->name; $value = $control->value; foreach ($this->controls as $index => $field) { if ($field->name == $name && $field->value == $value) { unset($this->controls[$index]); unset...
php
public function detachControl(FieldContract $control) { $name = $control->name; $value = $control->value; foreach ($this->controls as $index => $field) { if ($field->name == $name && $field->value == $value) { unset($this->controls[$index]); unset...
[ "public", "function", "detachControl", "(", "FieldContract", "$", "control", ")", "{", "$", "name", "=", "$", "control", "->", "name", ";", "$", "value", "=", "$", "control", "->", "value", ";", "foreach", "(", "$", "this", "->", "controls", "as", "$",...
Detaches control from controls collection @param FieldContract $control @return Fieldset
[ "Detaches", "control", "from", "controls", "collection" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/html/src/Form/Fieldset.php#L427-L438
228,053
antaresproject/core
src/components/html/src/Form/Fieldset.php
Fieldset.field
public function field($name) { if (!isset($this->keyMap[$name])) { throw new Exception(sprintf('Unable to find %s named field.', $name)); } return $this->controls[$this->keyMap[$name]]; }
php
public function field($name) { if (!isset($this->keyMap[$name])) { throw new Exception(sprintf('Unable to find %s named field.', $name)); } return $this->controls[$this->keyMap[$name]]; }
[ "public", "function", "field", "(", "$", "name", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "keyMap", "[", "$", "name", "]", ")", ")", "{", "throw", "new", "Exception", "(", "sprintf", "(", "'Unable to find %s named field.'", ",", "$", ...
gets field by name @param String $name @return Field @throws Exception
[ "gets", "field", "by", "name" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/html/src/Form/Fieldset.php#L470-L476
228,054
antaresproject/core
src/components/html/src/Form/Fieldset.php
Fieldset.types
public function types($name) { $return = []; foreach ($this->controls as $control) { if ((method_exists($control, 'getType') ? $control->getType() : $control->type) == $name) { array_push($return, $control); } } return $return; }
php
public function types($name) { $return = []; foreach ($this->controls as $control) { if ((method_exists($control, 'getType') ? $control->getType() : $control->type) == $name) { array_push($return, $control); } } return $return; }
[ "public", "function", "types", "(", "$", "name", ")", "{", "$", "return", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "controls", "as", "$", "control", ")", "{", "if", "(", "(", "method_exists", "(", "$", "control", ",", "'getType'", ")"...
get control list by type @param String $name @return array
[ "get", "control", "list", "by", "type" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/html/src/Form/Fieldset.php#L484-L493
228,055
antaresproject/core
src/components/html/src/Form/Fieldset.php
Fieldset.layout
public function layout($layout, $params = []) { $this->layout = $layout; $this->params = $params; return $this; }
php
public function layout($layout, $params = []) { $this->layout = $layout; $this->params = $params; return $this; }
[ "public", "function", "layout", "(", "$", "layout", ",", "$", "params", "=", "[", "]", ")", "{", "$", "this", "->", "layout", "=", "$", "layout", ";", "$", "this", "->", "params", "=", "$", "params", ";", "return", "$", "this", ";", "}" ]
fieldset layout setter @param String $layout @param array $params @return \Antares\Html\Form\Fieldset
[ "fieldset", "layout", "setter" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/html/src/Form/Fieldset.php#L513-L518
228,056
antaresproject/core
src/components/html/src/Form/Fieldset.php
Fieldset.render
public function render($row = null) { if (is_null($this->layout)) { throw new Exception('Unable to render fieldset layout. Layout is empty.'); } $attributes = array_merge([ 'controls' => $this->controls, 'name' => $this->name, 'attribut...
php
public function render($row = null) { if (is_null($this->layout)) { throw new Exception('Unable to render fieldset layout. Layout is empty.'); } $attributes = array_merge([ 'controls' => $this->controls, 'name' => $this->name, 'attribut...
[ "public", "function", "render", "(", "$", "row", "=", "null", ")", "{", "if", "(", "is_null", "(", "$", "this", "->", "layout", ")", ")", "{", "throw", "new", "Exception", "(", "'Unable to render fieldset layout. Layout is empty.'", ")", ";", "}", "$", "at...
renders custom fieldset view @return \Illuminate\View\View
[ "renders", "custom", "fieldset", "view" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/html/src/Form/Fieldset.php#L525-L538
228,057
antaresproject/core
src/components/html/src/Form/Fieldset.php
Fieldset.controls
public function controls() { $return = []; foreach ($this->controls as $control) { if (in_array((method_exists($control, 'getType') ? $control->getType() : $control->type), ['button', 'submit'] )) { continue; } array_push($retur...
php
public function controls() { $return = []; foreach ($this->controls as $control) { if (in_array((method_exists($control, 'getType') ? $control->getType() : $control->type), ['button', 'submit'] )) { continue; } array_push($retur...
[ "public", "function", "controls", "(", ")", "{", "$", "return", "=", "[", "]", ";", "foreach", "(", "$", "this", "->", "controls", "as", "$", "control", ")", "{", "if", "(", "in_array", "(", "(", "method_exists", "(", "$", "control", ",", "'getType'"...
retrives all controls from fieldsets @return array
[ "retrives", "all", "controls", "from", "fieldsets" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/html/src/Form/Fieldset.php#L545-L556
228,058
antaresproject/core
src/components/memory/resources/database/migrations/2013_04_11_233631_antares_memory_create_schemas_table.php
AntaresMemoryCreateSchemasTable.createInstallationProgressTable
public function createInstallationProgressTable() { Schema::create('tbl_antares_installation', function (Blueprint $table) { $table->increments('id'); $table->string('name')->unique(); $table->text('content')->nullable(); }); }
php
public function createInstallationProgressTable() { Schema::create('tbl_antares_installation', function (Blueprint $table) { $table->increments('id'); $table->string('name')->unique(); $table->text('content')->nullable(); }); }
[ "public", "function", "createInstallationProgressTable", "(", ")", "{", "Schema", "::", "create", "(", "'tbl_antares_installation'", ",", "function", "(", "Blueprint", "$", "table", ")", "{", "$", "table", "->", "increments", "(", "'id'", ")", ";", "$", "table...
CREATE SCHEMAS FOR INSTALLATION PROGRESS
[ "CREATE", "SCHEMAS", "FOR", "INSTALLATION", "PROGRESS" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/memory/resources/database/migrations/2013_04_11_233631_antares_memory_create_schemas_table.php#L258-L265
228,059
antaresproject/core
src/ui/base/src/Navigation/Menu.php
Menu.addItem
public function addItem(string $id, string $label, string $uri = null, string $icon = null, array $attributes = []): Menu { $attributes = Arr::except($attributes, ['label', 'uri']); $this->dispatcher->dispatch(new ItemAdding($id, $this->generateMenuItem($this->menuItem))); if ($icon && Str...
php
public function addItem(string $id, string $label, string $uri = null, string $icon = null, array $attributes = []): Menu { $attributes = Arr::except($attributes, ['label', 'uri']); $this->dispatcher->dispatch(new ItemAdding($id, $this->generateMenuItem($this->menuItem))); if ($icon && Str...
[ "public", "function", "addItem", "(", "string", "$", "id", ",", "string", "$", "label", ",", "string", "$", "uri", "=", "null", ",", "string", "$", "icon", "=", "null", ",", "array", "$", "attributes", "=", "[", "]", ")", ":", "Menu", "{", "$", "...
Add a new item to the menu. @param string $id @param string $label @param null|string $uri @param null|string $icon @param array $attributes @return Menu
[ "Add", "a", "new", "item", "to", "the", "menu", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/ui/base/src/Navigation/Menu.php#L83-L108
228,060
antaresproject/core
src/ui/base/src/Navigation/Menu.php
Menu.getChild
public function getChild(string $id) { $menuItem = $this->menuItem->getChild($id); return $menuItem ? $this->generateMenuItem($menuItem) : null; }
php
public function getChild(string $id) { $menuItem = $this->menuItem->getChild($id); return $menuItem ? $this->generateMenuItem($menuItem) : null; }
[ "public", "function", "getChild", "(", "string", "$", "id", ")", "{", "$", "menuItem", "=", "$", "this", "->", "menuItem", "->", "getChild", "(", "$", "id", ")", ";", "return", "$", "menuItem", "?", "$", "this", "->", "generateMenuItem", "(", "$", "m...
Returns submenu by the given item ID. @param string $id @return Menu|null
[ "Returns", "submenu", "by", "the", "given", "item", "ID", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/ui/base/src/Navigation/Menu.php#L116-L121
228,061
antaresproject/core
src/ui/base/src/Navigation/Menu.php
Menu.generateMenuItem
protected function generateMenuItem(ItemInterface $menuItem): Menu { return new Menu($menuItem, $this->dispatcher, $this->renderer); }
php
protected function generateMenuItem(ItemInterface $menuItem): Menu { return new Menu($menuItem, $this->dispatcher, $this->renderer); }
[ "protected", "function", "generateMenuItem", "(", "ItemInterface", "$", "menuItem", ")", ":", "Menu", "{", "return", "new", "Menu", "(", "$", "menuItem", ",", "$", "this", "->", "dispatcher", ",", "$", "this", "->", "renderer", ")", ";", "}" ]
Returns menu item wrapped by menu object. @param ItemInterface $menuItem @return Menu
[ "Returns", "menu", "item", "wrapped", "by", "menu", "object", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/ui/base/src/Navigation/Menu.php#L139-L142
228,062
lawoole/framework
src/Foundation/Bootstrap/LoadConfigurations.php
LoadConfigurations.loadEnvironmentConfigurations
public function loadEnvironmentConfigurations($app, RepositoryContract $repository) { $configPath = realpath($app->environmentPath()); $files = $this->getConfigurationFilesInPath($configPath); foreach ($files as $scope => $path) { $items = require $path; foreach ($...
php
public function loadEnvironmentConfigurations($app, RepositoryContract $repository) { $configPath = realpath($app->environmentPath()); $files = $this->getConfigurationFilesInPath($configPath); foreach ($files as $scope => $path) { $items = require $path; foreach ($...
[ "public", "function", "loadEnvironmentConfigurations", "(", "$", "app", ",", "RepositoryContract", "$", "repository", ")", "{", "$", "configPath", "=", "realpath", "(", "$", "app", "->", "environmentPath", "(", ")", ")", ";", "$", "files", "=", "$", "this", ...
Load the environment configuration items. @param \Illuminate\Contracts\Foundation\Application $app @param \Illuminate\Contracts\Config\Repository $repository
[ "Load", "the", "environment", "configuration", "items", "." ]
ac701a76f5d37c81273b7202ba37094766cb5dfe
https://github.com/lawoole/framework/blob/ac701a76f5d37c81273b7202ba37094766cb5dfe/src/Foundation/Bootstrap/LoadConfigurations.php#L40-L64
228,063
lawoole/framework
src/Foundation/Bootstrap/LoadConfigurations.php
LoadConfigurations.getConfigurationFilesInPath
protected function getConfigurationFilesInPath($configPath) { $files = []; if (! is_dir($configPath)) { return $files; } foreach (Finder::create()->files()->name('*.php')->depth(0)->in($configPath) as $file) { $files[$file->getBasename('.php')] = $file->getR...
php
protected function getConfigurationFilesInPath($configPath) { $files = []; if (! is_dir($configPath)) { return $files; } foreach (Finder::create()->files()->name('*.php')->depth(0)->in($configPath) as $file) { $files[$file->getBasename('.php')] = $file->getR...
[ "protected", "function", "getConfigurationFilesInPath", "(", "$", "configPath", ")", "{", "$", "files", "=", "[", "]", ";", "if", "(", "!", "is_dir", "(", "$", "configPath", ")", ")", "{", "return", "$", "files", ";", "}", "foreach", "(", "Finder", "::...
Get all of the configuration files in the given directory. @param $configPath @return array
[ "Get", "all", "of", "the", "configuration", "files", "in", "the", "given", "directory", "." ]
ac701a76f5d37c81273b7202ba37094766cb5dfe
https://github.com/lawoole/framework/blob/ac701a76f5d37c81273b7202ba37094766cb5dfe/src/Foundation/Bootstrap/LoadConfigurations.php#L83-L98
228,064
antaresproject/core
src/components/model/src/Value/Meta.php
Meta.put
public function put($key, $value = '') { Arr::set($this->attributes, $key, $value); return $this; }
php
public function put($key, $value = '') { Arr::set($this->attributes, $key, $value); return $this; }
[ "public", "function", "put", "(", "$", "key", ",", "$", "value", "=", "''", ")", "{", "Arr", "::", "set", "(", "$", "this", "->", "attributes", ",", "$", "key", ",", "$", "value", ")", ";", "return", "$", "this", ";", "}" ]
Set a value from a key. @param string $key A string of key to add the value. @param mixed $value The value. @return $this
[ "Set", "a", "value", "from", "a", "key", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/model/src/Value/Meta.php#L49-L54
228,065
antaresproject/core
src/components/model/src/Role.php
Role.getLowerRoles
protected function getLowerRoles(array $elements, $parentId = 0, &$return = []) { foreach ($elements as $element) { if ($element['parent_id'] != $parentId) { continue; } $children = $this->getLowerRoles($elements, $element['id'], $return); if (...
php
protected function getLowerRoles(array $elements, $parentId = 0, &$return = []) { foreach ($elements as $element) { if ($element['parent_id'] != $parentId) { continue; } $children = $this->getLowerRoles($elements, $element['id'], $return); if (...
[ "protected", "function", "getLowerRoles", "(", "array", "$", "elements", ",", "$", "parentId", "=", "0", ",", "&", "$", "return", "=", "[", "]", ")", "{", "foreach", "(", "$", "elements", "as", "$", "element", ")", "{", "if", "(", "$", "element", "...
builds recursive widgets stack @param array $elements @param mixed $parentId @return array
[ "builds", "recursive", "widgets", "stack" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/model/src/Role.php#L191-L207
228,066
antaresproject/core
src/components/model/src/Role.php
Role.getChilds
public function getChilds($withOwnRole = false) { $id = $this->id; $roles = $this->withTrashed()->orderby('parent_id')->get()->toArray(); $lowerRoles = $this->getLowerRoles($roles, $id); return ($withOwnRole) ? array_merge([$this->id], $lowerRoles) : $lowerRoles; }
php
public function getChilds($withOwnRole = false) { $id = $this->id; $roles = $this->withTrashed()->orderby('parent_id')->get()->toArray(); $lowerRoles = $this->getLowerRoles($roles, $id); return ($withOwnRole) ? array_merge([$this->id], $lowerRoles) : $lowerRoles; }
[ "public", "function", "getChilds", "(", "$", "withOwnRole", "=", "false", ")", "{", "$", "id", "=", "$", "this", "->", "id", ";", "$", "roles", "=", "$", "this", "->", "withTrashed", "(", ")", "->", "orderby", "(", "'parent_id'", ")", "->", "get", ...
Gets child roles @param boolean $withOwnRole @return array
[ "Gets", "child", "roles" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/model/src/Role.php#L215-L221
228,067
marmelab/SonataElasticaBundle
Model/ElasticaModelManager.php
ElasticaModelManager.getNormalizedIdentifier
public function getNormalizedIdentifier($model) { $identifier = $this->baseModelManager->getNormalizedIdentifier($model); if ($identifier === null) { $identifierName = is_array($this->getModelIdentifier(get_class($model))) ? current($this->getModelIdentifier(get_class($model))) : $this-...
php
public function getNormalizedIdentifier($model) { $identifier = $this->baseModelManager->getNormalizedIdentifier($model); if ($identifier === null) { $identifierName = is_array($this->getModelIdentifier(get_class($model))) ? current($this->getModelIdentifier(get_class($model))) : $this-...
[ "public", "function", "getNormalizedIdentifier", "(", "$", "model", ")", "{", "$", "identifier", "=", "$", "this", "->", "baseModelManager", "->", "getNormalizedIdentifier", "(", "$", "model", ")", ";", "if", "(", "$", "identifier", "===", "null", ")", "{", ...
Get the identifiers for this model class as a string. @param object $model @return string a string representation of the identifiers for this instance
[ "Get", "the", "identifiers", "for", "this", "model", "class", "as", "a", "string", "." ]
7b8a2fde72bca7844060fcae6387641478fe7bdc
https://github.com/marmelab/SonataElasticaBundle/blob/7b8a2fde72bca7844060fcae6387641478fe7bdc/Model/ElasticaModelManager.php#L215-L226
228,068
marmelab/SonataElasticaBundle
Model/ElasticaModelManager.php
ElasticaModelManager.getSortParameters
public function getSortParameters(FieldDescriptionInterface $fieldDescription, DatagridInterface $datagrid) { return $this->baseModelManager->getSortParameters($fieldDescription, $datagrid); }
php
public function getSortParameters(FieldDescriptionInterface $fieldDescription, DatagridInterface $datagrid) { return $this->baseModelManager->getSortParameters($fieldDescription, $datagrid); }
[ "public", "function", "getSortParameters", "(", "FieldDescriptionInterface", "$", "fieldDescription", ",", "DatagridInterface", "$", "datagrid", ")", "{", "return", "$", "this", "->", "baseModelManager", "->", "getSortParameters", "(", "$", "fieldDescription", ",", "$...
Returns the parameters used in the columns header @param FieldDescriptionInterface $fieldDescription @param DatagridInterface $datagrid @return array
[ "Returns", "the", "parameters", "used", "in", "the", "columns", "header" ]
7b8a2fde72bca7844060fcae6387641478fe7bdc
https://github.com/marmelab/SonataElasticaBundle/blob/7b8a2fde72bca7844060fcae6387641478fe7bdc/Model/ElasticaModelManager.php#L324-L327
228,069
antaresproject/core
src/ui/components/datatables/src/Datatables.php
Datatables.of
public static function of($builder, $classname = null) { $datatables = app(Datatables::class); $datatables->builder = $builder; $engine = ($builder instanceof QueryBuilder) ? $datatables->usingQueryBuilder($builder) : ($builder instanceof Collection ? $datatables->using...
php
public static function of($builder, $classname = null) { $datatables = app(Datatables::class); $datatables->builder = $builder; $engine = ($builder instanceof QueryBuilder) ? $datatables->usingQueryBuilder($builder) : ($builder instanceof Collection ? $datatables->using...
[ "public", "static", "function", "of", "(", "$", "builder", ",", "$", "classname", "=", "null", ")", "{", "$", "datatables", "=", "app", "(", "Datatables", "::", "class", ")", ";", "$", "datatables", "->", "builder", "=", "$", "builder", ";", "$", "en...
Gets query and returns instance of class. @param mixed $builder @param String $classname @return mixed
[ "Gets", "query", "and", "returns", "instance", "of", "class", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/ui/components/datatables/src/Datatables.php#L64-L71
228,070
antaresproject/core
src/components/model/src/User.php
User.getIsActiveAttribute
public function getIsActiveAttribute() { try { $activity = $this->activity; $lastActivity = ($activity instanceof UserActivity) ? $activity->last_activity : null; $laDate = Carbon::createFromFormat('Y-m-d H:i:s', $lastActivity); return !(Carbon::now(...
php
public function getIsActiveAttribute() { try { $activity = $this->activity; $lastActivity = ($activity instanceof UserActivity) ? $activity->last_activity : null; $laDate = Carbon::createFromFormat('Y-m-d H:i:s', $lastActivity); return !(Carbon::now(...
[ "public", "function", "getIsActiveAttribute", "(", ")", "{", "try", "{", "$", "activity", "=", "$", "this", "->", "activity", ";", "$", "lastActivity", "=", "(", "$", "activity", "instanceof", "UserActivity", ")", "?", "$", "activity", "->", "last_activity",...
Check wheter this user is currently active @return bool
[ "Check", "wheter", "this", "user", "is", "currently", "active" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/model/src/User.php#L292-L302
228,071
antaresproject/core
src/components/model/src/User.php
User.getLastActivityAttribute
public function getLastActivityAttribute() { $activity = $this->activity; return ($activity instanceof UserActivity) ? Carbon::createFromFormat('Y-m-d H:i:s', $activity->last_activity) : null; }
php
public function getLastActivityAttribute() { $activity = $this->activity; return ($activity instanceof UserActivity) ? Carbon::createFromFormat('Y-m-d H:i:s', $activity->last_activity) : null; }
[ "public", "function", "getLastActivityAttribute", "(", ")", "{", "$", "activity", "=", "$", "this", "->", "activity", ";", "return", "(", "$", "activity", "instanceof", "UserActivity", ")", "?", "Carbon", "::", "createFromFormat", "(", "'Y-m-d H:i:s'", ",", "$...
Get last dateTime of last activity of this user @return null|Carbon
[ "Get", "last", "dateTime", "of", "last", "activity", "of", "this", "user" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/model/src/User.php#L321-L326
228,072
antaresproject/core
src/components/model/src/User.php
User.getFullnameAttribute
public function getFullnameAttribute($value) { if (!strlen($this->firstname) and ! strlen($this->lastname)) { return '---'; } return $this->firstname . ' ' . $this->lastname; }
php
public function getFullnameAttribute($value) { if (!strlen($this->firstname) and ! strlen($this->lastname)) { return '---'; } return $this->firstname . ' ' . $this->lastname; }
[ "public", "function", "getFullnameAttribute", "(", "$", "value", ")", "{", "if", "(", "!", "strlen", "(", "$", "this", "->", "firstname", ")", "and", "!", "strlen", "(", "$", "this", "->", "lastname", ")", ")", "{", "return", "'---'", ";", "}", "retu...
Get the user's fullname @param string $value @return string
[ "Get", "the", "user", "s", "fullname" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/model/src/User.php#L568-L574
228,073
antaresproject/core
src/components/model/src/User.php
User.getLastLoggedAtAttribute
public function getLastLoggedAtAttribute() { $lastLogin = Logs::where('user_id', $this->id) ->where('name', 'like', 'USERAUTHLISTENER_ONUSERLOGIN') ->orderBy('created_at', 'desc') ->get(['created_at']) ->first(); return ($lastLogin) ? ...
php
public function getLastLoggedAtAttribute() { $lastLogin = Logs::where('user_id', $this->id) ->where('name', 'like', 'USERAUTHLISTENER_ONUSERLOGIN') ->orderBy('created_at', 'desc') ->get(['created_at']) ->first(); return ($lastLogin) ? ...
[ "public", "function", "getLastLoggedAtAttribute", "(", ")", "{", "$", "lastLogin", "=", "Logs", "::", "where", "(", "'user_id'", ",", "$", "this", "->", "id", ")", "->", "where", "(", "'name'", ",", "'like'", ",", "'USERAUTHLISTENER_ONUSERLOGIN'", ")", "->",...
Getting last logged attribute @return String
[ "Getting", "last", "logged", "attribute" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/model/src/User.php#L591-L600
228,074
antaresproject/core
src/components/model/src/User.php
User.getChildAreas
public function getChildAreas() { return $this->roles()->getModel()->newQuery()->select(['area'])->whereIn('id', $this->roles->first() ->getChilds()) ->groupBy('area') ->whereNotNull('area') ->pluck('area...
php
public function getChildAreas() { return $this->roles()->getModel()->newQuery()->select(['area'])->whereIn('id', $this->roles->first() ->getChilds()) ->groupBy('area') ->whereNotNull('area') ->pluck('area...
[ "public", "function", "getChildAreas", "(", ")", "{", "return", "$", "this", "->", "roles", "(", ")", "->", "getModel", "(", ")", "->", "newQuery", "(", ")", "->", "select", "(", "[", "'area'", "]", ")", "->", "whereIn", "(", "'id'", ",", "$", "thi...
Gets user child areas @return array
[ "Gets", "user", "child", "areas" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/model/src/User.php#L618-L625
228,075
gggeek/ggwebservices
classes/ggjsonrpcresponse.php
ggJSONRPCResponse.payload
function payload() { if ( $this->IsFault ) { return json_encode( array( 'result' => null, 'error' => array( 'faultCode' => $this->FaultCode, 'faultString' => $this->FaultString ), 'id' => $this->Id ) ); } else { ...
php
function payload() { if ( $this->IsFault ) { return json_encode( array( 'result' => null, 'error' => array( 'faultCode' => $this->FaultCode, 'faultString' => $this->FaultString ), 'id' => $this->Id ) ); } else { ...
[ "function", "payload", "(", ")", "{", "if", "(", "$", "this", "->", "IsFault", ")", "{", "return", "json_encode", "(", "array", "(", "'result'", "=>", "null", ",", "'error'", "=>", "array", "(", "'faultCode'", "=>", "$", "this", "->", "FaultCode", ",",...
Returns the json payload for the response.
[ "Returns", "the", "json", "payload", "for", "the", "response", "." ]
4f6e1ada1aa94301acd2ef3cd0966c7be06313ec
https://github.com/gggeek/ggwebservices/blob/4f6e1ada1aa94301acd2ef3cd0966c7be06313ec/classes/ggjsonrpcresponse.php#L21-L37
228,076
gggeek/ggwebservices
classes/ggjsonrpcresponse.php
ggJSONRPCResponse.decodeStream
function decodeStream( $request, $stream, $headers=false, $cookies=array(), $statuscode="200" ) { $this->decodeStreamCommon( $request, $stream, $headers, $cookies, $statuscode ); /// @todo refuse bad content-types? $results = json_decode( $stream, true ); if ( !is_array($results) ...
php
function decodeStream( $request, $stream, $headers=false, $cookies=array(), $statuscode="200" ) { $this->decodeStreamCommon( $request, $stream, $headers, $cookies, $statuscode ); /// @todo refuse bad content-types? $results = json_decode( $stream, true ); if ( !is_array($results) ...
[ "function", "decodeStream", "(", "$", "request", ",", "$", "stream", ",", "$", "headers", "=", "false", ",", "$", "cookies", "=", "array", "(", ")", ",", "$", "statuscode", "=", "\"200\"", ")", "{", "$", "this", "->", "decodeStreamCommon", "(", "$", ...
Decodes the JSONRPC response stream. Request is used for matching id. @todo Name is not set to response from request - a bit weird... @param ggJSONRPCRequest $request
[ "Decodes", "the", "JSONRPC", "response", "stream", ".", "Request", "is", "used", "for", "matching", "id", "." ]
4f6e1ada1aa94301acd2ef3cd0966c7be06313ec
https://github.com/gggeek/ggwebservices/blob/4f6e1ada1aa94301acd2ef3cd0966c7be06313ec/classes/ggjsonrpcresponse.php#L45-L98
228,077
antaresproject/customfields
src/Events/ProcessorHandler.php
ProcessorHandler.onSave
public function onSave(ArrayAccess $parameters, $namespace = null) { $exception = false; if (is_null($namespace)) { return true; } try { $fieldsCollection = $this->field->query()->where('namespace', $namespace)->get(); if ($fieldsCollection->isEmp...
php
public function onSave(ArrayAccess $parameters, $namespace = null) { $exception = false; if (is_null($namespace)) { return true; } try { $fieldsCollection = $this->field->query()->where('namespace', $namespace)->get(); if ($fieldsCollection->isEmp...
[ "public", "function", "onSave", "(", "ArrayAccess", "$", "parameters", ",", "$", "namespace", "=", "null", ")", "{", "$", "exception", "=", "false", ";", "if", "(", "is_null", "(", "$", "namespace", ")", ")", "{", "return", "true", ";", "}", "try", "...
saves data values from customfields @param ArrayAccess $parameters @param String $namespace @return boolean
[ "saves", "data", "values", "from", "customfields" ]
7e7fd9dec91249c946592c31dbd3994a3d41c1bd
https://github.com/antaresproject/customfields/blob/7e7fd9dec91249c946592c31dbd3994a3d41c1bd/src/Events/ProcessorHandler.php#L81-L108
228,078
antaresproject/customfields
src/Events/ProcessorHandler.php
ProcessorHandler.save
protected function save(array $parameters, $foreignId, $namespace = null) { if (empty($parameters)) { return true; } $where = ['user_id' => $this->userId, 'foreign_id' => $foreignId, 'namespace' => $namespace]; foreach ($parameters as $fieldId => $fieldValue) { ...
php
protected function save(array $parameters, $foreignId, $namespace = null) { if (empty($parameters)) { return true; } $where = ['user_id' => $this->userId, 'foreign_id' => $foreignId, 'namespace' => $namespace]; foreach ($parameters as $fieldId => $fieldValue) { ...
[ "protected", "function", "save", "(", "array", "$", "parameters", ",", "$", "foreignId", ",", "$", "namespace", "=", "null", ")", "{", "if", "(", "empty", "(", "$", "parameters", ")", ")", "{", "return", "true", ";", "}", "$", "where", "=", "[", "'...
saves collection of data from customfields inputs @param array $parameters @param numeric $foreignId @param String $namespace @return boolean
[ "saves", "collection", "of", "data", "from", "customfields", "inputs" ]
7e7fd9dec91249c946592c31dbd3994a3d41c1bd
https://github.com/antaresproject/customfields/blob/7e7fd9dec91249c946592c31dbd3994a3d41c1bd/src/Events/ProcessorHandler.php#L117-L140
228,079
antaresproject/customfields
src/Events/ProcessorHandler.php
ProcessorHandler.resolveModel
protected function resolveModel(array $where) { $model = $this->fieldData->query()->where($where)->first(); return (is_null($model)) ? $this->fieldData->newInstance($where) : $model; }
php
protected function resolveModel(array $where) { $model = $this->fieldData->query()->where($where)->first(); return (is_null($model)) ? $this->fieldData->newInstance($where) : $model; }
[ "protected", "function", "resolveModel", "(", "array", "$", "where", ")", "{", "$", "model", "=", "$", "this", "->", "fieldData", "->", "query", "(", ")", "->", "where", "(", "$", "where", ")", "->", "first", "(", ")", ";", "return", "(", "is_null", ...
resolve model instance @param array $where @return Eloquent
[ "resolve", "model", "instance" ]
7e7fd9dec91249c946592c31dbd3994a3d41c1bd
https://github.com/antaresproject/customfields/blob/7e7fd9dec91249c946592c31dbd3994a3d41c1bd/src/Events/ProcessorHandler.php#L147-L151
228,080
antaresproject/core
src/foundation/src/Http/Presenters/Presenter.php
Presenter.getScriptsContainers
private function getScriptsContainers() { $container = null; $config = null; foreach (['container', 'app', 'foundation'] as $name) { if (isset($this->{$name}) && is_null($container)) { $container = $this->{$name}->make('antares.asset'); $config ...
php
private function getScriptsContainers() { $container = null; $config = null; foreach (['container', 'app', 'foundation'] as $name) { if (isset($this->{$name}) && is_null($container)) { $container = $this->{$name}->make('antares.asset'); $config ...
[ "private", "function", "getScriptsContainers", "(", ")", "{", "$", "container", "=", "null", ";", "$", "config", "=", "null", ";", "foreach", "(", "[", "'container'", ",", "'app'", ",", "'foundation'", "]", "as", "$", "name", ")", "{", "if", "(", "isse...
scripts containers resolver @return array
[ "scripts", "containers", "resolver" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Http/Presenters/Presenter.php#L95-L116
228,081
antaresproject/core
src/foundation/src/Http/Presenters/Presenter.php
Presenter.scripts
protected function scripts($key = null, $position = 'antares/foundation::scripts') { if (!$key) { return false; } $containers = $this->getScriptsContainers(); $config = $containers['config']->get($key); $container = $containers['container']->container(isset(...
php
protected function scripts($key = null, $position = 'antares/foundation::scripts') { if (!$key) { return false; } $containers = $this->getScriptsContainers(); $config = $containers['config']->get($key); $container = $containers['container']->container(isset(...
[ "protected", "function", "scripts", "(", "$", "key", "=", "null", ",", "$", "position", "=", "'antares/foundation::scripts'", ")", "{", "if", "(", "!", "$", "key", ")", "{", "return", "false", ";", "}", "$", "containers", "=", "$", "this", "->", "getSc...
create presenter additional scripts @param String $key @param String $position @return void
[ "create", "presenter", "additional", "scripts" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Http/Presenters/Presenter.php#L125-L140
228,082
antaresproject/core
src/foundation/src/Http/Controllers/Extension/ViewerController.php
ViewerController.updateConfigurationValidationFailed
public function updateConfigurationValidationFailed(array $messages) { if (request()->ajax()) { return response()->json($messages); } $url = URL::previous(); return $this->redirectWithErrors($url, $messages); }
php
public function updateConfigurationValidationFailed(array $messages) { if (request()->ajax()) { return response()->json($messages); } $url = URL::previous(); return $this->redirectWithErrors($url, $messages); }
[ "public", "function", "updateConfigurationValidationFailed", "(", "array", "$", "messages", ")", "{", "if", "(", "request", "(", ")", "->", "ajax", "(", ")", ")", "{", "return", "response", "(", ")", "->", "json", "(", "$", "messages", ")", ";", "}", "...
Handles the failed validation for edited configuration. @param array $messages @return mixed
[ "Handles", "the", "failed", "validation", "for", "edited", "configuration", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Http/Controllers/Extension/ViewerController.php#L115-L124
228,083
antaresproject/core
src/foundation/src/Http/Controllers/Extension/ViewerController.php
ViewerController.updateConfigurationSuccess
public function updateConfigurationSuccess() { $url = route(area() . '.modules.index'); $message = trans('antares/foundation::response.extensions.configuration-success'); return $this->redirectWithMessage($url, $message); }
php
public function updateConfigurationSuccess() { $url = route(area() . '.modules.index'); $message = trans('antares/foundation::response.extensions.configuration-success'); return $this->redirectWithMessage($url, $message); }
[ "public", "function", "updateConfigurationSuccess", "(", ")", "{", "$", "url", "=", "route", "(", "area", "(", ")", ".", "'.modules.index'", ")", ";", "$", "message", "=", "trans", "(", "'antares/foundation::response.extensions.configuration-success'", ")", ";", "...
Handles the successfully updated configuration. @return mixed
[ "Handles", "the", "successfully", "updated", "configuration", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Http/Controllers/Extension/ViewerController.php#L131-L137
228,084
antaresproject/core
src/foundation/src/Http/Controllers/Extension/ViewerController.php
ViewerController.updateConfigurationFailed
public function updateConfigurationFailed(array $errors) { $url = URL::previous(); $message = trans('antares/foundation::response.extensions.configuration-failed'); return $this->redirectWithMessage($url, $message, 'error'); }
php
public function updateConfigurationFailed(array $errors) { $url = URL::previous(); $message = trans('antares/foundation::response.extensions.configuration-failed'); return $this->redirectWithMessage($url, $message, 'error'); }
[ "public", "function", "updateConfigurationFailed", "(", "array", "$", "errors", ")", "{", "$", "url", "=", "URL", "::", "previous", "(", ")", ";", "$", "message", "=", "trans", "(", "'antares/foundation::response.extensions.configuration-failed'", ")", ";", "retur...
Handles the failed update configuration. @param array $errors @return mixed
[ "Handles", "the", "failed", "update", "configuration", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/foundation/src/Http/Controllers/Extension/ViewerController.php#L145-L151
228,085
lawoole/framework
src/Server/ServerManager.php
ServerManager.server
public function server() { if ($this->server != null) { return $this->server; } return $this->server = $this->createServer(); }
php
public function server() { if ($this->server != null) { return $this->server; } return $this->server = $this->createServer(); }
[ "public", "function", "server", "(", ")", "{", "if", "(", "$", "this", "->", "server", "!=", "null", ")", "{", "return", "$", "this", "->", "server", ";", "}", "return", "$", "this", "->", "server", "=", "$", "this", "->", "createServer", "(", ")",...
Get the server instance. @return \Lawoole\Contracts\Server\Server
[ "Get", "the", "server", "instance", "." ]
ac701a76f5d37c81273b7202ba37094766cb5dfe
https://github.com/lawoole/framework/blob/ac701a76f5d37c81273b7202ba37094766cb5dfe/src/Server/ServerManager.php#L55-L62
228,086
antaresproject/core
src/utils/asset/src/Dispatcher.php
Dispatcher.getAssetSandboxSourceUrl
protected function getAssetSandboxSourceUrl(&$source, $group = null) { if (is_null(self::$sandboxPath)) { if (!Foundation::bound('antares.version')) { self::$sandboxPath = ''; } $sandboxMode = app('request')->get('sandbox'); if ($sandboxMode a...
php
protected function getAssetSandboxSourceUrl(&$source, $group = null) { if (is_null(self::$sandboxPath)) { if (!Foundation::bound('antares.version')) { self::$sandboxPath = ''; } $sandboxMode = app('request')->get('sandbox'); if ($sandboxMode a...
[ "protected", "function", "getAssetSandboxSourceUrl", "(", "&", "$", "source", ",", "$", "group", "=", "null", ")", "{", "if", "(", "is_null", "(", "self", "::", "$", "sandboxPath", ")", ")", "{", "if", "(", "!", "Foundation", "::", "bound", "(", "'anta...
create asset sandbox source url @param String $source @return boolean
[ "create", "asset", "sandbox", "source", "url" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/utils/asset/src/Dispatcher.php#L214-L230
228,087
antaresproject/core
src/ui/components/templates/src/Adapter/TemplateAdapter.php
TemplateAdapter.decorate
public function decorate($content = null) { $current = realpath(__DIR__ . '/../') . '/'; $dotted = 'templates.default'; $params = array_merge($this->shared, ['content' => $content]); if (!is_null($this->template)) { $viewPath = str_replace([$current, '/resources/views/'...
php
public function decorate($content = null) { $current = realpath(__DIR__ . '/../') . '/'; $dotted = 'templates.default'; $params = array_merge($this->shared, ['content' => $content]); if (!is_null($this->template)) { $viewPath = str_replace([$current, '/resources/views/'...
[ "public", "function", "decorate", "(", "$", "content", "=", "null", ")", "{", "$", "current", "=", "realpath", "(", "__DIR__", ".", "'/../'", ")", ".", "'/'", ";", "$", "dotted", "=", "'templates.default'", ";", "$", "params", "=", "array_merge", "(", ...
resolve template path @param String $content @return String
[ "resolve", "template", "path" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/ui/components/templates/src/Adapter/TemplateAdapter.php#L73-L84
228,088
antaresproject/core
src/components/model/src/Memory/UserMetaRepository.php
UserMetaRepository.retrieveAll
public function retrieveAll($userId) { if (!isset($this->userMeta[$userId])) { $data = $this->getModel()->where('user_id', '=', $userId)->get(); $this->userMeta[$userId] = $this->processRetrievedData($userId, $data); } return Arr::get($this->userMet...
php
public function retrieveAll($userId) { if (!isset($this->userMeta[$userId])) { $data = $this->getModel()->where('user_id', '=', $userId)->get(); $this->userMeta[$userId] = $this->processRetrievedData($userId, $data); } return Arr::get($this->userMet...
[ "public", "function", "retrieveAll", "(", "$", "userId", ")", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "userMeta", "[", "$", "userId", "]", ")", ")", "{", "$", "data", "=", "$", "this", "->", "getModel", "(", ")", "->", "where", "(",...
Get user metas from database @param string $key @return mixed
[ "Get", "user", "metas", "from", "database" ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/model/src/Memory/UserMetaRepository.php#L203-L210
228,089
tomwalder/php-appengine-search
src/Search/Mapper.php
Mapper.mapExpressions
private function mapExpressions(array $arr_fields, Document $obj_doc) { foreach($arr_fields as $obj_field) { $str_field_name = $obj_field->getName(); $obj_value = $obj_field->getValue(); if(ContentType::GEO === $obj_value->getType()) { $obj_geo = $obj_valu...
php
private function mapExpressions(array $arr_fields, Document $obj_doc) { foreach($arr_fields as $obj_field) { $str_field_name = $obj_field->getName(); $obj_value = $obj_field->getValue(); if(ContentType::GEO === $obj_value->getType()) { $obj_geo = $obj_valu...
[ "private", "function", "mapExpressions", "(", "array", "$", "arr_fields", ",", "Document", "$", "obj_doc", ")", "{", "foreach", "(", "$", "arr_fields", "as", "$", "obj_field", ")", "{", "$", "str_field_name", "=", "$", "obj_field", "->", "getName", "(", ")...
Map expressions into a document @param Field[] $arr_fields @param Document $obj_doc
[ "Map", "expressions", "into", "a", "document" ]
e34a7f6ddf2f5e8dc51487562d413ca4fd1331ba
https://github.com/tomwalder/php-appengine-search/blob/e34a7f6ddf2f5e8dc51487562d413ca4fd1331ba/src/Search/Mapper.php#L101-L117
228,090
antaresproject/customfields
src/Http/Breadcrumb/Breadcrumb.php
Breadcrumb.onCustomFieldCreateOrEdit
public function onCustomFieldCreateOrEdit(Model $model) { $this->onList(); Breadcrumbs::register('customfields-create-update', function($breadcrumbs) use($model) { $breadcrumbs->parent('customfields'); $name = $model->exists ? 'Update custom field ' . $model->name : 'Create c...
php
public function onCustomFieldCreateOrEdit(Model $model) { $this->onList(); Breadcrumbs::register('customfields-create-update', function($breadcrumbs) use($model) { $breadcrumbs->parent('customfields'); $name = $model->exists ? 'Update custom field ' . $model->name : 'Create c...
[ "public", "function", "onCustomFieldCreateOrEdit", "(", "Model", "$", "model", ")", "{", "$", "this", "->", "onList", "(", ")", ";", "Breadcrumbs", "::", "register", "(", "'customfields-create-update'", ",", "function", "(", "$", "breadcrumbs", ")", "use", "("...
when shows edit or create custom field form @param Model $model
[ "when", "shows", "edit", "or", "create", "custom", "field", "form" ]
7e7fd9dec91249c946592c31dbd3994a3d41c1bd
https://github.com/antaresproject/customfields/blob/7e7fd9dec91249c946592c31dbd3994a3d41c1bd/src/Http/Breadcrumb/Breadcrumb.php#L48-L58
228,091
coincheckjp/coincheck-php
lib/Coincheck/BankAccount.php
BankAccount.create
public function create($params = array()) { $arr = array( "bank_name" => $params["bank_name"], "branch_name" => $params["branch_name"], "bank_account_type" => $params["bank_account_type"], "number" => $params["number"], "name" => $params["name"] ...
php
public function create($params = array()) { $arr = array( "bank_name" => $params["bank_name"], "branch_name" => $params["branch_name"], "bank_account_type" => $params["bank_account_type"], "number" => $params["number"], "name" => $params["name"] ...
[ "public", "function", "create", "(", "$", "params", "=", "array", "(", ")", ")", "{", "$", "arr", "=", "array", "(", "\"bank_name\"", "=>", "$", "params", "[", "\"bank_name\"", "]", ",", "\"branch_name\"", "=>", "$", "params", "[", "\"branch_name\"", "]"...
Create a new BankAccount. @param mixed @return Json Array
[ "Create", "a", "new", "BankAccount", "." ]
5991003cb0ae827697888aeebd0aea0267fad7fa
https://github.com/coincheckjp/coincheck-php/blob/5991003cb0ae827697888aeebd0aea0267fad7fa/lib/Coincheck/BankAccount.php#L20-L31
228,092
coincheckjp/coincheck-php
lib/Coincheck/BankAccount.php
BankAccount.delete
public function delete($params = array()) { $arr = array( "id" => $params["id"] ); $rawResponse = $this->client->request('delete', 'api/bank_accounts/' . $arr["id"], $arr); return $rawResponse; }
php
public function delete($params = array()) { $arr = array( "id" => $params["id"] ); $rawResponse = $this->client->request('delete', 'api/bank_accounts/' . $arr["id"], $arr); return $rawResponse; }
[ "public", "function", "delete", "(", "$", "params", "=", "array", "(", ")", ")", "{", "$", "arr", "=", "array", "(", "\"id\"", "=>", "$", "params", "[", "\"id\"", "]", ")", ";", "$", "rawResponse", "=", "$", "this", "->", "client", "->", "request",...
Delete a BankAccount. @param mixed @return Json Array
[ "Delete", "a", "BankAccount", "." ]
5991003cb0ae827697888aeebd0aea0267fad7fa
https://github.com/coincheckjp/coincheck-php/blob/5991003cb0ae827697888aeebd0aea0267fad7fa/lib/Coincheck/BankAccount.php#L53-L58
228,093
coincheckjp/coincheck-php
lib/Coincheck/Borrow.php
Borrow.repay
public function repay($params = array()) { $arr = array( "id" => $params["id"]); $rawResponse = $this->client->request('post', 'api/lending/borrows/' . $arr['id'] . '/repay', $arr); return $rawResponse; }
php
public function repay($params = array()) { $arr = array( "id" => $params["id"]); $rawResponse = $this->client->request('post', 'api/lending/borrows/' . $arr['id'] . '/repay', $arr); return $rawResponse; }
[ "public", "function", "repay", "(", "$", "params", "=", "array", "(", ")", ")", "{", "$", "arr", "=", "array", "(", "\"id\"", "=>", "$", "params", "[", "\"id\"", "]", ")", ";", "$", "rawResponse", "=", "$", "this", "->", "client", "->", "request", ...
Based on this id, you can repay. @param mixed @return Json Array
[ "Based", "on", "this", "id", "you", "can", "repay", "." ]
5991003cb0ae827697888aeebd0aea0267fad7fa
https://github.com/coincheckjp/coincheck-php/blob/5991003cb0ae827697888aeebd0aea0267fad7fa/lib/Coincheck/Borrow.php#L49-L54
228,094
lawoole/framework
src/Http/Respondent.php
Respondent.addDateHeaderIfNecessary
protected function addDateHeaderIfNecessary($statusCode, $headerBag) { if ($statusCode >= 200 && $statusCode < 500 && ! $headerBag->has('Date')) { $date = DateTime::createFromFormat('U', time(), new DateTimeZone('UTC')); $headerBag->set('Date', $date->format('D, d M Y H:i:s').' GMT'...
php
protected function addDateHeaderIfNecessary($statusCode, $headerBag) { if ($statusCode >= 200 && $statusCode < 500 && ! $headerBag->has('Date')) { $date = DateTime::createFromFormat('U', time(), new DateTimeZone('UTC')); $headerBag->set('Date', $date->format('D, d M Y H:i:s').' GMT'...
[ "protected", "function", "addDateHeaderIfNecessary", "(", "$", "statusCode", ",", "$", "headerBag", ")", "{", "if", "(", "$", "statusCode", ">=", "200", "&&", "$", "statusCode", "<", "500", "&&", "!", "$", "headerBag", "->", "has", "(", "'Date'", ")", ")...
Add the Date header if it's missing. @see https://tools.ietf.org/html/rfc2616#section-14.18 @param int $statusCode @param \Symfony\Component\HttpFoundation\ResponseHeaderBag $headerBag
[ "Add", "the", "Date", "header", "if", "it", "s", "missing", "." ]
ac701a76f5d37c81273b7202ba37094766cb5dfe
https://github.com/lawoole/framework/blob/ac701a76f5d37c81273b7202ba37094766cb5dfe/src/Http/Respondent.php#L75-L82
228,095
lawoole/framework
src/Http/Respondent.php
Respondent.setCookieInResponse
protected function setCookieInResponse(Cookie $cookie) { $method = $cookie->isRaw() ? 'rawcookie' : 'cookie'; $this->response->$method( $cookie->getName(), $cookie->getValue(), $cookie->getExpiresTime(), $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(), $cookie-...
php
protected function setCookieInResponse(Cookie $cookie) { $method = $cookie->isRaw() ? 'rawcookie' : 'cookie'; $this->response->$method( $cookie->getName(), $cookie->getValue(), $cookie->getExpiresTime(), $cookie->getPath(), $cookie->getDomain(), $cookie->isSecure(), $cookie-...
[ "protected", "function", "setCookieInResponse", "(", "Cookie", "$", "cookie", ")", "{", "$", "method", "=", "$", "cookie", "->", "isRaw", "(", ")", "?", "'rawcookie'", ":", "'cookie'", ";", "$", "this", "->", "response", "->", "$", "method", "(", "$", ...
Set a cookie in response header. @param \Symfony\Component\HttpFoundation\Cookie $cookie
[ "Set", "a", "cookie", "in", "response", "header", "." ]
ac701a76f5d37c81273b7202ba37094766cb5dfe
https://github.com/lawoole/framework/blob/ac701a76f5d37c81273b7202ba37094766cb5dfe/src/Http/Respondent.php#L104-L112
228,096
lawoole/framework
src/Http/Respondent.php
Respondent.sendChunk
public function sendChunk($data, $lastChunk = false) { $this->chunked = true; if ($lastChunk) { $this->response->end($data); } elseif (strlen($data) > 0) { $this->response->write($data); } }
php
public function sendChunk($data, $lastChunk = false) { $this->chunked = true; if ($lastChunk) { $this->response->end($data); } elseif (strlen($data) > 0) { $this->response->write($data); } }
[ "public", "function", "sendChunk", "(", "$", "data", ",", "$", "lastChunk", "=", "false", ")", "{", "$", "this", "->", "chunked", "=", "true", ";", "if", "(", "$", "lastChunk", ")", "{", "$", "this", "->", "response", "->", "end", "(", "$", "data",...
Send response body in chunked. @param string $data @param bool $lastChunk
[ "Send", "response", "body", "in", "chunked", "." ]
ac701a76f5d37c81273b7202ba37094766cb5dfe
https://github.com/lawoole/framework/blob/ac701a76f5d37c81273b7202ba37094766cb5dfe/src/Http/Respondent.php#L144-L153
228,097
antaresproject/core
src/components/extension/src/Loader.php
Loader.registerExtensionProviders
public function registerExtensionProviders(ExtensionContract $extension) { $filePath = $extension->getPath() . '/providers.php'; if ($this->files->exists($filePath)) { $providers = (array) $this->files->getRequire($filePath); $this->provides($providers); } }
php
public function registerExtensionProviders(ExtensionContract $extension) { $filePath = $extension->getPath() . '/providers.php'; if ($this->files->exists($filePath)) { $providers = (array) $this->files->getRequire($filePath); $this->provides($providers); } }
[ "public", "function", "registerExtensionProviders", "(", "ExtensionContract", "$", "extension", ")", "{", "$", "filePath", "=", "$", "extension", "->", "getPath", "(", ")", ".", "'/providers.php'", ";", "if", "(", "$", "this", "->", "files", "->", "exists", ...
Registers extension providers. @param ExtensionContract $extension @throws \Exception
[ "Registers", "extension", "providers", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/extension/src/Loader.php#L80-L89
228,098
antaresproject/core
src/components/extension/src/Loader.php
Loader.provides
public function provides(array $provides) { $services = []; foreach ($provides as $provider) { try { if (!isset($this->manifest[$provider])) { $services[$provider] = $this->recompileProvider($provider); } else { $se...
php
public function provides(array $provides) { $services = []; foreach ($provides as $provider) { try { if (!isset($this->manifest[$provider])) { $services[$provider] = $this->recompileProvider($provider); } else { $se...
[ "public", "function", "provides", "(", "array", "$", "provides", ")", "{", "$", "services", "=", "[", "]", ";", "foreach", "(", "$", "provides", "as", "$", "provider", ")", "{", "try", "{", "if", "(", "!", "isset", "(", "$", "this", "->", "manifest...
Load available service providers. @param array $provides @return void
[ "Load", "available", "service", "providers", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/extension/src/Loader.php#L97-L115
228,099
antaresproject/core
src/components/extension/src/Loader.php
Loader.recompileProvider
protected function recompileProvider(string $provider): array { $instance = $this->app->resolveProvider($provider); $type = $instance->isDeferred() ? 'Deferred' : 'Eager'; return $this->{"register{$type}ServiceProvider"}($provider, $instance); }
php
protected function recompileProvider(string $provider): array { $instance = $this->app->resolveProvider($provider); $type = $instance->isDeferred() ? 'Deferred' : 'Eager'; return $this->{"register{$type}ServiceProvider"}($provider, $instance); }
[ "protected", "function", "recompileProvider", "(", "string", "$", "provider", ")", ":", "array", "{", "$", "instance", "=", "$", "this", "->", "app", "->", "resolveProvider", "(", "$", "provider", ")", ";", "$", "type", "=", "$", "instance", "->", "isDef...
Recompile provider by reviewing the class configuration. @param string $provider @return array
[ "Recompile", "provider", "by", "reviewing", "the", "class", "configuration", "." ]
b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2
https://github.com/antaresproject/core/blob/b6d088d9f8a0642e71e8ff7a93997f1f34bc5ca2/src/components/extension/src/Loader.php#L123-L131