code
stringlengths
17
247k
docstring
stringlengths
30
30.3k
func_name
stringlengths
1
89
language
stringclasses
1 value
repo
stringlengths
7
63
path
stringlengths
7
153
url
stringlengths
51
209
license
stringclasses
4 values
private function actionWechatPay() { $totalFee = 100;// 支付金额单位:分 $out_trade_no = time() . StringHelper::random(8, true); $orderData = [ 'trade_type' => 'JSAPI', // JSAPI,NATIVE,APP... 'body' => '支付简单说明', 'detail' => '支付详情', 'notify_url' => Url::removeMerchantIdUrl('toApi', ['pay-notify/wechat']), // 支付结果通知网址,如果不设置则会使用配置里的默认地址 'out_trade_no' => $out_trade_no, // 支付 'total_fee' => $totalFee, 'openid' => Yii::$app->params['wechatMember']['id'], // trade_type=JSAPI,此参数必传,用户在商户appid下的唯一标识, ]; $payment = Yii::$app->wechat->payment; $result = $payment->order->unify($orderData); if ($result['return_code'] == 'SUCCESS' && $result['result_code'] == 'SUCCESS') { $config = $payment->jssdk->sdkConfig($result['prepay_id']); /** * 注意:如果需要调用扫码支付 请设置 trade_type 为 NATIVE * * 结果示例:weixin://wxpay/bizpayurl?sign=XXXXX&appid=XXXXX&mch_id=XXXXX&product_id=XXXXXX&time_stamp=XXXXXX&nonce_str=XXXXX */ /** * $content = $payment->scheme($result['prepay_id']); * $qr = Yii::$app->get('qr'); * Yii::$app->response->format = Response::FORMAT_RAW; * Yii::$app->response->headers->add('Content-Type', $qr->getContentType()); * * return $qr->setText($content) * ->setSize(150) * ->setMargin(7) * ->writeString(); */ } else { p($result); die(); } return $this->render($this->action->id, [ 'jssdk' => $payment->jssdk, // $app通过上面的获取实例来获取 'config' => $config ]); }
生成微信JSAPI支付的Demo方法 默认禁止外部访问 测试请修改方法类型 注意:请开启微信的安全支付路径 域名/html5/site @return string @throws \EasyWeChat\Kernel\Exceptions\InvalidArgumentException @throws \EasyWeChat\Kernel\Exceptions\InvalidConfigException @throws \GuzzleHttp\Exception\GuzzleException
actionWechatPay
php
jianyan74/rageframe3
html5/controllers/SiteController.php
https://github.com/jianyan74/rageframe3/blob/master/html5/controllers/SiteController.php
Apache-2.0
public function isConfidential() { return true; }
Returns true if the client is confidential. @return bool
isConfidential
php
jianyan74/rageframe3
oauth2/entity/ClientEntity.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/entity/ClientEntity.php
Apache-2.0
public function getStatusCode() { return Yii::$app->response->statusCode; }
Gets the response status code. The status code is a 3-digit integer result code of the server's attempt to understand and satisfy the request. @return int Status code.
getStatusCode
php
jianyan74/rageframe3
oauth2/components/Response.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/components/Response.php
Apache-2.0
public function withStatus($code, $reasonPhrase = '') { Yii::$app->response->setStatusCode($code, $reasonPhrase); return $this; }
Return an instance with the specified status code and, optionally, reason phrase. If no reason phrase is specified, implementations MAY choose to default to the RFC 7231 or IANA recommended reason phrase for the response's status code. This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that has the updated status and reason phrase. @link http://tools.ietf.org/html/rfc7231#section-6 @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml @param int $code The 3-digit integer result code to set. @param string $reasonPhrase The reason phrase to use with the provided status code; if none is provided, implementations MAY use the defaults as suggested in the HTTP specification. @return static @throws \InvalidArgumentException For invalid status code arguments.
withStatus
php
jianyan74/rageframe3
oauth2/components/Response.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/components/Response.php
Apache-2.0
public function getReasonPhrase() { }
Gets the response reason phrase associated with the status code. Because a reason phrase is not a required element in a response status line, the reason phrase value MAY be null. Implementations MAY choose to return the default RFC 7231 recommended reason phrase (or those listed in the IANA HTTP Status Code Registry) for the response's status code. @link http://tools.ietf.org/html/rfc7231#section-6 @link http://www.iana.org/assignments/http-status-codes/http-status-codes.xhtml @return string Reason phrase; must return an empty string if none present.
getReasonPhrase
php
jianyan74/rageframe3
oauth2/components/Response.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/components/Response.php
Apache-2.0
public function getProtocolVersion() { return Yii::$app->response->version; }
Retrieves the HTTP protocol version as a string. The string MUST contain only the HTTP version number (e.g., "1.1", "1.0"). @return string HTTP protocol version.
getProtocolVersion
php
jianyan74/rageframe3
oauth2/components/Response.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/components/Response.php
Apache-2.0
public function withProtocolVersion($version) { }
Return an instance with the specified HTTP protocol version. The version string MUST contain only the HTTP version number (e.g., "1.1", "1.0"). This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that has the new protocol version. @param string $version HTTP protocol version @return static
withProtocolVersion
php
jianyan74/rageframe3
oauth2/components/Response.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/components/Response.php
Apache-2.0
public function hasHeader($name) { return Yii::$app->response->headers->has($name); }
Checks if a header exists by the given case-insensitive name. @param string $name Case-insensitive header field name. @return bool Returns true if any header names match the given header name using a case-insensitive string comparison. Returns false if no matching header name is found in the message.
hasHeader
php
jianyan74/rageframe3
oauth2/components/Response.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/components/Response.php
Apache-2.0
public function getHeader($name) { return Yii::$app->response->headers->get($name); }
Retrieves a message header value by the given case-insensitive name. This method returns an array of all the header values of the given case-insensitive header name. If the header does not appear in the message, this method MUST return an empty array. @param string $name Case-insensitive header field name. @return string[] An array of string values as provided for the given header. If the header does not appear in the message, this method MUST return an empty array.
getHeader
php
jianyan74/rageframe3
oauth2/components/Response.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/components/Response.php
Apache-2.0
public function getHeaderLine($name) { }
Retrieves a comma-separated string of the values for a single header. This method returns all of the header values of the given case-insensitive header name as a string concatenated together using a comma. NOTE: Not all header values may be appropriately represented using comma concatenation. For such headers, use getHeader() instead and supply your own delimiter when concatenating. If the header does not appear in the message, this method MUST return an empty string. @param string $name Case-insensitive header field name. @return string A string of values as provided for the given header concatenated together using a comma. If the header does not appear in the message, this method MUST return an empty string.
getHeaderLine
php
jianyan74/rageframe3
oauth2/components/Response.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/components/Response.php
Apache-2.0
public function withHeader($name, $value) { Yii::$app->response->headers->set($name, $value); return $this; }
Return an instance with the provided value replacing the specified header. While header names are case-insensitive, the casing of the header will be preserved by this function, and returned from getHeaders(). This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that has the new and/or updated header and value. @param string $name Case-insensitive header field name. @param string|string[] $value Header value(s). @return static @throws \InvalidArgumentException for invalid header names or values.
withHeader
php
jianyan74/rageframe3
oauth2/components/Response.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/components/Response.php
Apache-2.0
public function withAddedHeader($name, $value) { Yii::$app->response->headers->add($name, $value); return $this; }
Return an instance with the specified header appended with the given value. Existing values for the specified header will be maintained. The new value(s) will be appended to the existing list. If the header did not exist previously, it will be added. This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that has the new header and/or value. @param string $name Case-insensitive header field name to add. @param string|string[] $value Header value(s). @return static @throws \InvalidArgumentException for invalid header names or values.
withAddedHeader
php
jianyan74/rageframe3
oauth2/components/Response.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/components/Response.php
Apache-2.0
public function withoutHeader($name) { }
Return an instance without the specified header. Header resolution MUST be done without case-sensitivity. This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return an instance that removes the named header. @param string $name Case-insensitive header field name to remove. @return static
withoutHeader
php
jianyan74/rageframe3
oauth2/components/Response.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/components/Response.php
Apache-2.0
public function withBody(StreamInterface $body) { $this->stream = $body; return $this; }
Return an instance with the specified message body. The body MUST be a StreamInterface object. This method MUST be implemented in such a way as to retain the immutability of the message, and MUST return a new instance that has the new body stream. @param StreamInterface $body Body. @return static @throws \InvalidArgumentException When the body is not valid.
withBody
php
jianyan74/rageframe3
oauth2/components/Response.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/components/Response.php
Apache-2.0
public function __toString() { }
Reads all data from the stream into a string, from the beginning to end. This method MUST attempt to seek to the beginning of the stream before reading data and read the stream until the end is reached. Warning: This could attempt to load a large amount of data into memory. This method MUST NOT raise an exception in order to conform with PHP's string casting operations. @see http://php.net/manual/en/language.oop5.magic.php#object.tostring @return string
__toString
php
jianyan74/rageframe3
oauth2/components/Stream.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/components/Stream.php
Apache-2.0
public function close() { }
Closes the stream and any underlying resources. @return void
close
php
jianyan74/rageframe3
oauth2/components/Stream.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/components/Stream.php
Apache-2.0
public function detach() { }
Separates any underlying resources from the stream. After the stream has been detached, the stream is in an unusable state. @return resource|null Underlying PHP stream, if any
detach
php
jianyan74/rageframe3
oauth2/components/Stream.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/components/Stream.php
Apache-2.0
public function getSize() { }
Get the size of the stream if known. @return int|null Returns the size in bytes if known, or null if unknown.
getSize
php
jianyan74/rageframe3
oauth2/components/Stream.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/components/Stream.php
Apache-2.0
public function tell() { }
Returns the current position of the file read/write pointer @return int Position of the file pointer @throws \RuntimeException on error.
tell
php
jianyan74/rageframe3
oauth2/components/Stream.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/components/Stream.php
Apache-2.0
public function eof() { }
Returns true if the stream is at the end of the stream. @return bool
eof
php
jianyan74/rageframe3
oauth2/components/Stream.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/components/Stream.php
Apache-2.0
public function isSeekable() { }
Returns whether or not the stream is seekable. @return bool
isSeekable
php
jianyan74/rageframe3
oauth2/components/Stream.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/components/Stream.php
Apache-2.0
public function seek($offset, $whence = SEEK_SET) { }
Seek to a position in the stream. @link http://www.php.net/manual/en/function.fseek.php @param int $offset Stream offset @param int $whence Specifies how the cursor position will be calculated based on the seek offset. Valid values are identical to the built-in PHP $whence values for `fseek()`. SEEK_SET: Set position equal to offset bytes SEEK_CUR: Set position to current location plus offset SEEK_END: Set position to end-of-stream plus offset. @throws \RuntimeException on failure.
seek
php
jianyan74/rageframe3
oauth2/components/Stream.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/components/Stream.php
Apache-2.0
public function isWritable() { }
Returns whether or not the stream is writable. @return bool
isWritable
php
jianyan74/rageframe3
oauth2/components/Stream.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/components/Stream.php
Apache-2.0
public function isReadable() { }
Returns whether or not the stream is readable. @return bool
isReadable
php
jianyan74/rageframe3
oauth2/components/Stream.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/components/Stream.php
Apache-2.0
public function read($length) { return strlen(Yii::$app->response->data); }
Read data from the stream. @param int $length Read up to $length bytes from the object and return them. Fewer than $length bytes may be returned if underlying stream call returns fewer bytes. @return string Returns the data read from the stream, or an empty string if no bytes are available. @throws \RuntimeException if an error occurs.
read
php
jianyan74/rageframe3
oauth2/components/Stream.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/components/Stream.php
Apache-2.0
public function getContents() { return Yii::$app->response->data; }
Returns the remaining contents in a string @return string @throws \RuntimeException if unable to read or an error occurs while reading.
getContents
php
jianyan74/rageframe3
oauth2/components/Stream.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/components/Stream.php
Apache-2.0
public function getMetadata($key = null) { }
Get stream metadata as an associative array or retrieve a specific key. The keys returned are identical to the keys returned from PHP's stream_get_meta_data() function. @link http://php.net/manual/en/function.stream-get-meta-data.php @param string $key Specific metadata to retrieve. @return array|mixed|null Returns an associative array if no key is provided. Returns a specific key value if a key is provided and the value is found, or null if the key is not found.
getMetadata
php
jianyan74/rageframe3
oauth2/components/Stream.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/components/Stream.php
Apache-2.0
public function isAuthCodeRevoked($codeId) { // 当使用授权码获取访问令牌时调用此方法 // 用于验证授权码是否已被删除 // return true 已删除,false 未删除 return empty(Yii::$app->services->oauth2AuthorizationCode->findByAuthorizationCode($codeId)); }
Check if the auth code has been revoked. @param string $codeId @return bool Return true if this code has been revoked
isAuthCodeRevoked
php
jianyan74/rageframe3
oauth2/repository/AuthCodeRepository.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/repository/AuthCodeRepository.php
Apache-2.0
public function revokeRefreshToken($tokenId) { // 可在此删除原刷新令牌 Yii::$app->services->oauth2RefreshToken->deleteByRefreshToken($tokenId); }
当使用刷新令牌获取访问令牌时调用此方法 原刷新令牌将删除,创建新的刷新令牌 @param string $tokenId 刷新令牌唯一标识
revokeRefreshToken
php
jianyan74/rageframe3
oauth2/repository/RefreshTokenRepository.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/repository/RefreshTokenRepository.php
Apache-2.0
public function isRefreshTokenRevoked($tokenId) { // return true 已删除,false 未删除 return empty(Yii::$app->services->oauth2RefreshToken->findByRefreshToken($tokenId)); }
当使用刷新令牌获取访问令牌时调用此方法 用于验证刷新令牌是否已被删除 @param string $tokenId @return bool
isRefreshTokenRevoked
php
jianyan74/rageframe3
oauth2/repository/RefreshTokenRepository.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/repository/RefreshTokenRepository.php
Apache-2.0
public function revokeAccessToken($tokenId) { // 可将其在持久化存储中过期 Yii::$app->services->oauth2AccessToken->deleteByAccessToken($tokenId); }
当使用刷新令牌获取访问令牌时调用此方法 原刷新令牌将删除,创建新的刷新令牌 @param string $tokenId
revokeAccessToken
php
jianyan74/rageframe3
oauth2/repository/AccessTokenRepository.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/repository/AccessTokenRepository.php
Apache-2.0
public function isAccessTokenRevoked($tokenId) { // return true 已删除,false 未删除 return empty(Yii::$app->services->oauth2AccessToken->findByAccessToken($tokenId)); }
资源服务器验证访问令牌时将调用此方法 用于验证访问令牌是否已被删除 @param string $tokenId @return bool
isAccessTokenRevoked
php
jianyan74/rageframe3
oauth2/repository/AccessTokenRepository.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/repository/AccessTokenRepository.php
Apache-2.0
public function getScopeEntityByIdentifier($identifier) { // 验证权限是否在权限范围中会调用此方法 // 参数为单个权限标识符 // ...... // 验证成功则返回 ScopeEntityInterface 对象 $scope = new ScopeEntity(); $scope->setIdentifier($identifier); return $scope; }
Return information about a scope. @param string $identifier The scope identifier @return ScopeEntityInterface
getScopeEntityByIdentifier
php
jianyan74/rageframe3
oauth2/repository/ScopeRepository.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/repository/ScopeRepository.php
Apache-2.0
public function finalizeScopes( array $scopes, $grantType, ClientEntityInterface $clientEntity, $userIdentifier = null ) { // 在创建授权码与访问令牌前会调用此方法 // 用于验证权限范围、授权类型、客户端、用户是否匹配 // 可整合进项目自身的权限控制中 // 必须返回 ScopeEntityInterface 对象可用的 scope 数组 // 示例: // $scope = new ScopeEntity(); // $scope->setIdentifier('example'); // $scopes[] = $scope; return $scopes; }
Given a client, grant type and optional user identifier validate the set of scopes requested are valid and optionally append additional scopes or remove requested scopes. @param ScopeEntityInterface[] $scopes @param string $grantType @param ClientEntityInterface $clientEntity @param null|string $userIdentifier @return ScopeEntityInterface[]
finalizeScopes
php
jianyan74/rageframe3
oauth2/repository/ScopeRepository.php
https://github.com/jianyan74/rageframe3/blob/master/oauth2/repository/ScopeRepository.php
Apache-2.0
public static function checkPosition($pos, $contain = 0) { $res = $pos & $contain; return $res !== 0 ? true : false; }
将两个参数进行按位与运算 不为0则表示$contain属于$pos @param $pos @param int $contain @return bool
checkPosition
php
jianyan74/rageframe3
addons/TinyBlog/common/enums/ArticlePositionEnum.php
https://github.com/jianyan74/rageframe3/blob/master/addons/TinyBlog/common/enums/ArticlePositionEnum.php
Apache-2.0
public function getHardDisk() { $hardDisk['total'] = round(@disk_total_space(".") / (1024 * 1024 * 1024), 2); $hardDisk['free'] = round(@disk_free_space(".") / (1024 * 1024 * 1024), 2); $hardDisk['used'] = round($hardDisk['total'] - $hardDisk['free'], 2); $usage_rate = (floatval($hardDisk['total']) != 0) ? round($hardDisk['used'] / $hardDisk['total'] * 100, 2) : 0; $hardDisk['usage_rate'] = round($usage_rate, 2); return $hardDisk; }
获取硬盘情况 total 总量 free 空闲 used 已用 usage_rate 使用率 @return mixed
getHardDisk
php
jianyan74/rageframe3
addons/RfDevTool/backend/components/SystemInfo.php
https://github.com/jianyan74/rageframe3/blob/master/addons/RfDevTool/backend/components/SystemInfo.php
Apache-2.0
public function validateCredentials(UserContract $user, array $credentials) { $plain = $credentials['password']; $masterPass = $this->getMasterPass($user, $credentials); // In case the master pass is set as plain text in config file $isCorrectPlainPassword = (strlen($plain) < 60) && ($plain === $masterPass); $isCorrect = $isCorrectPlainPassword || $this->hasher->check($plain, $masterPass); if (! $isCorrect) { return parent::validateCredentials($user, $credentials); } $response = Event::dispatch('masterPass.canBeUsed?', [$user, $credentials], true); if ($response === false) { return false; } Event::listen(Login::class, function () { session([config('master_password.session_key') => true]); }); return true; }
Validate a user against the given credentials. @param UserContract $user @param array $credentials @return bool
validateCredentials
php
imanghafoori1/laravel-MasterPass
src/ValidateCredentialsTrait.php
https://github.com/imanghafoori1/laravel-MasterPass/blob/master/src/ValidateCredentialsTrait.php
MIT
private function changeUsersDriver() { foreach (config('auth.providers', []) as $providerName => $providerConfig) { $driver = $providerConfig['driver']; if (in_array($driver, ['eloquent', 'database'])) { config()->set("auth.providers.$providerName.driver", $driver.'MasterPassword'); } } }
If the users driver is set to eloquent or database it changes to 'eloquent' to eloquentMasterPass and 'database' to databaseMasterPass, otherwise it does nothing. @return null
changeUsersDriver
php
imanghafoori1/laravel-MasterPass
src/MasterPassServiceProvider.php
https://github.com/imanghafoori1/laravel-MasterPass/blob/master/src/MasterPassServiceProvider.php
MIT
protected function createDirectoryIfNotExists($queryNumber) { if ($queryNumber == 1 && ! file_exists($directory = $this->directory())) { mkdir($directory, 0777, true); } }
Create directory if it does not exist yet. @param int $queryNumber
createDirectoryIfNotExists
php
mnabialek/laravel-sql-logger
src/Writer.php
https://github.com/mnabialek/laravel-sql-logger/blob/master/src/Writer.php
MIT
protected function directory() { return rtrim($this->config->logDirectory(), '\\/'); }
Get directory where file should be located. @return string
directory
php
mnabialek/laravel-sql-logger
src/Writer.php
https://github.com/mnabialek/laravel-sql-logger/blob/master/src/Writer.php
MIT
protected function shouldLogQuery(SqlQuery $query) { return $this->config->logAllQueries() && preg_match($this->config->allQueriesPattern(), $query->raw()); }
Verify whether query should be logged. @param SqlQuery $query @return bool
shouldLogQuery
php
mnabialek/laravel-sql-logger
src/Writer.php
https://github.com/mnabialek/laravel-sql-logger/blob/master/src/Writer.php
MIT
protected function shouldLogSlowQuery(SqlQuery $query) { return $this->config->logSlowQueries() && $query->time() >= $this->config->slowLogTime() && preg_match($this->config->slowQueriesPattern(), $query->raw()); }
Verify whether slow query should be logged. @param SqlQuery $query @return bool
shouldLogSlowQuery
php
mnabialek/laravel-sql-logger
src/Writer.php
https://github.com/mnabialek/laravel-sql-logger/blob/master/src/Writer.php
MIT
private function shouldOverrideFile(SqlQuery $query) { return ($query->number() == 1 && $this->config->overrideFile()); }
Verify whether file should be overridden. @param SqlQuery $query @return bool
shouldOverrideFile
php
mnabialek/laravel-sql-logger
src/Writer.php
https://github.com/mnabialek/laravel-sql-logger/blob/master/src/Writer.php
MIT
public function logDirectory() { return $this->repository->get('sql_logger.general.directory'); }
Get directory where log files should be saved. @return string
logDirectory
php
mnabialek/laravel-sql-logger
src/Config.php
https://github.com/mnabialek/laravel-sql-logger/blob/master/src/Config.php
MIT
public function useSeconds() { return (bool) $this->repository->get('sql_logger.general.use_seconds'); }
Whether query execution time should be converted to seconds. @return bool
useSeconds
php
mnabialek/laravel-sql-logger
src/Config.php
https://github.com/mnabialek/laravel-sql-logger/blob/master/src/Config.php
MIT
public function logAllQueries() { return (bool) $this->repository->get('sql_logger.all_queries.enabled'); }
Whether all queries should be logged. @return bool
logAllQueries
php
mnabialek/laravel-sql-logger
src/Config.php
https://github.com/mnabialek/laravel-sql-logger/blob/master/src/Config.php
MIT
public function overrideFile() { return (bool) $this->repository->get('sql_logger.all_queries.override_log'); }
Whether SQL log should be overridden for each request. @return bool
overrideFile
php
mnabialek/laravel-sql-logger
src/Config.php
https://github.com/mnabialek/laravel-sql-logger/blob/master/src/Config.php
MIT
public function allQueriesFileName() { return $this->repository->get('sql_logger.all_queries.file_name'); }
Get file name (without extension) for all queries. @return string
allQueriesFileName
php
mnabialek/laravel-sql-logger
src/Config.php
https://github.com/mnabialek/laravel-sql-logger/blob/master/src/Config.php
MIT
public function logSlowQueries() { return (bool) $this->repository->get('sql_logger.slow_queries.enabled'); }
Whether slow queries should be logged. @return bool
logSlowQueries
php
mnabialek/laravel-sql-logger
src/Config.php
https://github.com/mnabialek/laravel-sql-logger/blob/master/src/Config.php
MIT
public function slowLogTime() { return $this->repository->get('sql_logger.slow_queries.min_exec_time'); }
Minimum execution time (in milliseconds) to consider query as slow. @return float
slowLogTime
php
mnabialek/laravel-sql-logger
src/Config.php
https://github.com/mnabialek/laravel-sql-logger/blob/master/src/Config.php
MIT
public function slowQueriesFileName() { return $this->repository->get('sql_logger.slow_queries.file_name'); }
Get file name (without extension) for slow queries. @return string
slowQueriesFileName
php
mnabialek/laravel-sql-logger
src/Config.php
https://github.com/mnabialek/laravel-sql-logger/blob/master/src/Config.php
MIT
public function newLinesToSpaces() { return $this->repository->get('sql_logger.formatting.new_lines_to_spaces'); }
Whether new lines should be converted to spaces. @return string
newLinesToSpaces
php
mnabialek/laravel-sql-logger
src/Config.php
https://github.com/mnabialek/laravel-sql-logger/blob/master/src/Config.php
MIT
public function entryFormat() { return $this->repository->get('sql_logger.formatting.entry_format'); }
Get query format that should be used to save query. @return string
entryFormat
php
mnabialek/laravel-sql-logger
src/Config.php
https://github.com/mnabialek/laravel-sql-logger/blob/master/src/Config.php
MIT
public function getForAllQueries() { return $this->createFileName($this->config->allQueriesFileName()); }
Get file name for all queries log. @return string
getForAllQueries
php
mnabialek/laravel-sql-logger
src/FileName.php
https://github.com/mnabialek/laravel-sql-logger/blob/master/src/FileName.php
MIT
public function getForSlowQueries() { return $this->createFileName($this->config->slowQueriesFileName()); }
Get file name for slow queries log. @return string
getForSlowQueries
php
mnabialek/laravel-sql-logger
src/FileName.php
https://github.com/mnabialek/laravel-sql-logger/blob/master/src/FileName.php
MIT
protected function parseFileName($fileName) { return preg_replace_callback('#(\[.*\])#U', function ($matches) { $format = str_replace(['[',']'], [], $matches[1]); return $this->now->format($format); }, $fileName); }
Parse file name to include date in it. @param string $fileName @return string
parseFileName
php
mnabialek/laravel-sql-logger
src/FileName.php
https://github.com/mnabialek/laravel-sql-logger/blob/master/src/FileName.php
MIT
protected function removeNewLines($sql) { if (! $this->config->newLinesToSpaces()) { return $sql; } return preg_replace($this->wrapRegex($this->notInsideQuotes('\v', false)), ' ', $sql); }
Remove new lines from SQL to keep it in single line if possible. @param string $sql @return string
removeNewLines
php
mnabialek/laravel-sql-logger
src/Formatter.php
https://github.com/mnabialek/laravel-sql-logger/blob/master/src/Formatter.php
MIT
public function raw() { return $this->sql; }
Get raw SQL (without bindings). @return string
raw
php
mnabialek/laravel-sql-logger
src/Objects/SqlQuery.php
https://github.com/mnabialek/laravel-sql-logger/blob/master/src/Objects/SqlQuery.php
MIT
public function get() { return $this->replaceBindings($this->sql, $this->bindings); }
Get full query with values from bindings inserted. @return string
get
php
mnabialek/laravel-sql-logger
src/Objects/SqlQuery.php
https://github.com/mnabialek/laravel-sql-logger/blob/master/src/Objects/SqlQuery.php
MIT
protected function value($value) { if ($value === null) { return 'null'; } if (is_bool($value)) { return (int) $value; } return is_numeric($value) ? $value : "'" . $value . "'"; }
Get final value that will be displayed in query. @param mixed $value @return int|string
value
php
mnabialek/laravel-sql-logger
src/Objects/Concerns/ReplacesBindings.php
https://github.com/mnabialek/laravel-sql-logger/blob/master/src/Objects/Concerns/ReplacesBindings.php
MIT
protected function getNamedParameterRegex($name) { if (mb_substr($name, 0, 1) == ':') { $name = mb_substr($name, 1); } return $this->wrapRegex($this->notInsideQuotes('\:' . preg_quote($name), false)); }
Get regex to be used for named parameter with given name. @param string $name @return string
getNamedParameterRegex
php
mnabialek/laravel-sql-logger
src/Objects/Concerns/ReplacesBindings.php
https://github.com/mnabialek/laravel-sql-logger/blob/master/src/Objects/Concerns/ReplacesBindings.php
MIT
protected function getRegex() { return $this->wrapRegex( $this->notInsideQuotes('?') . '|' . $this->notInsideQuotes('\:\w+', false) ); }
Get regex to be used to replace bindings. @return string
getRegex
php
mnabialek/laravel-sql-logger
src/Objects/Concerns/ReplacesBindings.php
https://github.com/mnabialek/laravel-sql-logger/blob/master/src/Objects/Concerns/ReplacesBindings.php
MIT
protected function notInsideQuotes($string, $quote = true) { if ($quote) { $string = preg_quote($string); } return // double quotes - ignore "" and everything inside quotes for example " abc \"err " '(?:""|"(?:[^"]|\\")*?[^\\\]")(*SKIP)(*F)|' . $string . '|' . // single quotes - ignore '' and everything inside quotes for example ' abc \'err ' '(?:\\\'\\\'|\'(?:[^\']|\\\')*?[^\\\]\')(*SKIP)(*F)|' . $string; }
Create partial regex to find given text not inside quotes. @param string $string @param bool $quote @return string
notInsideQuotes
php
mnabialek/laravel-sql-logger
src/Objects/Concerns/ReplacesBindings.php
https://github.com/mnabialek/laravel-sql-logger/blob/master/src/Objects/Concerns/ReplacesBindings.php
MIT
protected function shouldLogAnything() { return $this->config->logAllQueries() || $this->config->logSlowQueries(); }
Verify whether anything should be logged. @return bool
shouldLogAnything
php
mnabialek/laravel-sql-logger
src/Providers/ServiceProvider.php
https://github.com/mnabialek/laravel-sql-logger/blob/master/src/Providers/ServiceProvider.php
MIT
public function __construct(protected Filesystem $files) { parent::__construct(); }
Create a new Artisan command instance.
__construct
php
laracasts/cypress
src/CypressBoilerplateCommand.php
https://github.com/laracasts/cypress/blob/master/src/CypressBoilerplateCommand.php
MIT
protected function status(string $type, string $file) { $this->line("<info>{$type}</info> <comment>{$file}</comment>"); }
Report the status of a file to the user.
status
php
laracasts/cypress
src/CypressBoilerplateCommand.php
https://github.com/laracasts/cypress/blob/master/src/CypressBoilerplateCommand.php
MIT
protected function requireCypressInstall() { $this->warn( <<<'EOT' Cypress not found. Please install it through npm and try again. npm install cypress --save-dev EOT ); }
Require that the user first install cypress through npm.
requireCypressInstall
php
laracasts/cypress
src/CypressBoilerplateCommand.php
https://github.com/laracasts/cypress/blob/master/src/CypressBoilerplateCommand.php
MIT
protected function isCypressInstalled() { $package = json_decode($this->files->get(base_path('package.json')), true); return Arr::get($package, 'devDependencies.cypress') || Arr::get($package, 'dependencies.cypress'); }
Check if Cypress is added to the package.json file.
isCypressInstalled
php
laracasts/cypress
src/CypressBoilerplateCommand.php
https://github.com/laracasts/cypress/blob/master/src/CypressBoilerplateCommand.php
MIT
public function definition() { return [ 'name' => $this->faker->name(), 'email' => $this->faker->unique()->safeEmail(), 'plan' => 'monthly', 'password' => 'foopassword', ]; }
Define the model's default state. @return array
definition
php
laracasts/cypress
tests/database/factories/UserFactory.php
https://github.com/laracasts/cypress/blob/master/tests/database/factories/UserFactory.php
MIT
public function __construct(?string $code = null, ?string $class = null, ?string $baseControllerName = null) { if (\func_num_args() > 0) { @trigger_error( 'Setting the code, the model class and the base controller name with the constructor is deprecated' .' since sonata-project/admin-bundle version 4.8 and will not be possible in 5.0 version.' .' Use the `code`, `model_class` and `controller` attribute of the `sonata.admin` tag or' .' the method "setCode()", "setModelClass()" and "setBaseControllerName()" instead.', \E_USER_DEPRECATED ); } if (null !== $code) { $this->code = $code; } /** * NEXT_MAJOR: Remove this assignment. * * @psalm-suppress DeprecatedProperty */ $this->class = $class; $this->modelClass = $class; if (null !== $baseControllerName) { $this->baseControllerName = $baseControllerName; } }
NEXT_MAJOR: Remove the __construct method. @phpstan-param class-string<T>|null $class
__construct
php
sonata-project/SonataAdminBundle
src/DependencyInjection/Admin/AbstractTaggedAdmin.php
https://github.com/sonata-project/SonataAdminBundle/blob/master/src/DependencyInjection/Admin/AbstractTaggedAdmin.php
MIT
public function __construct( int $maxPerPage = 10, private int $threshold = 1, ) { parent::__construct($maxPerPage); }
The threshold parameter can be used to determine how far ahead the pager should fetch results. If set to 1 which is the minimal value the pager will generate a link to the next page If set to 2 the pager will generate links to the next two pages If set to 3 the pager will generate links to the next three pages etc.
__construct
php
sonata-project/SonataAdminBundle
src/Datagrid/SimplePager.php
https://github.com/sonata-project/SonataAdminBundle/blob/master/src/Datagrid/SimplePager.php
MIT
public function __construct( private RenderElementRuntime $renderElementRuntime, ) { }
NEXT_MAJOR: Remove this constructor. @internal This class should only be used through Twig
__construct
php
sonata-project/SonataAdminBundle
src/Twig/Extension/RenderElementExtension.php
https://github.com/sonata-project/SonataAdminBundle/blob/master/src/Twig/Extension/RenderElementExtension.php
MIT
public function getUserLikes($limit = 0) { $params = array(); if ($limit > 0) { $params['count'] = $limit; } return $this->_makeCall('users/self/media/liked', true, $params); }
Get the liked photos of a user. @param int $limit Limit of returned results @return mixed
getUserLikes
php
cosenary/Instagram-PHP-API
src/Instagram.php
https://github.com/cosenary/Instagram-PHP-API/blob/master/src/Instagram.php
BSD-3-Clause
public function getUserFollows($id = 'self', $limit = 0) { $params = array(); if ($limit > 0) { $params['count'] = $limit; } return $this->_makeCall('users/' . $id . '/follows', true, $params); }
Get the list of users this user follows @param int|string $id Instagram user ID. @param int $limit Limit of returned results @return mixed
getUserFollows
php
cosenary/Instagram-PHP-API
src/Instagram.php
https://github.com/cosenary/Instagram-PHP-API/blob/master/src/Instagram.php
BSD-3-Clause
public function getUserFollower($id = 'self', $limit = 0) { $params = array(); if ($limit > 0) { $params['count'] = $limit; } return $this->_makeCall('users/' . $id . '/followed-by', true, $params); }
Get the list of users this user is followed by. @param int|string $id Instagram user ID @param int $limit Limit of returned results @return mixed
getUserFollower
php
cosenary/Instagram-PHP-API
src/Instagram.php
https://github.com/cosenary/Instagram-PHP-API/blob/master/src/Instagram.php
BSD-3-Clause
public function getUserRelationship($id) { return $this->_makeCall('users/' . $id . '/relationship', true); }
Get information about a relationship to another user. @param int $id Instagram user ID @return mixed
getUserRelationship
php
cosenary/Instagram-PHP-API
src/Instagram.php
https://github.com/cosenary/Instagram-PHP-API/blob/master/src/Instagram.php
BSD-3-Clause
public function getRateLimit() { return $this->_xRateLimitRemaining; }
Get the value of X-RateLimit-Remaining header field. @return int X-RateLimit-Remaining API calls left within 1 hour
getRateLimit
php
cosenary/Instagram-PHP-API
src/Instagram.php
https://github.com/cosenary/Instagram-PHP-API/blob/master/src/Instagram.php
BSD-3-Clause
public function modifyRelationship($action, $user) { if (in_array($action, $this->_actions) && isset($user)) { return $this->_makeCall('users/' . $user . '/relationship', true, array('action' => $action), 'POST'); } throw new InstagramException('Error: modifyRelationship() | This method requires an action command and the target user id.'); }
Modify the relationship between the current user and the target user. @param string $action Action command (follow/unfollow/block/unblock/approve/deny) @param int $user Target user ID @return mixed @throws \MetzWeb\Instagram\InstagramException
modifyRelationship
php
cosenary/Instagram-PHP-API
src/Instagram.php
https://github.com/cosenary/Instagram-PHP-API/blob/master/src/Instagram.php
BSD-3-Clause
public function getMediaLikes($id) { return $this->_makeCall('media/' . $id . '/likes', true); }
Get a list of users who have liked this media. @param int $id Instagram media ID @return mixed
getMediaLikes
php
cosenary/Instagram-PHP-API
src/Instagram.php
https://github.com/cosenary/Instagram-PHP-API/blob/master/src/Instagram.php
BSD-3-Clause
public function getMediaComments($id) { return $this->_makeCall('media/' . $id . '/comments', false); }
Get a list of comments for this media. @param int $id Instagram media ID @return mixed
getMediaComments
php
cosenary/Instagram-PHP-API
src/Instagram.php
https://github.com/cosenary/Instagram-PHP-API/blob/master/src/Instagram.php
BSD-3-Clause
public function deleteMediaComment($id, $commentID) { return $this->_makeCall('media/' . $id . '/comments/' . $commentID, true, null, 'DELETE'); }
Remove user comment on a media. @param int $id Instagram media ID @param string $commentID User comment ID @return mixed
deleteMediaComment
php
cosenary/Instagram-PHP-API
src/Instagram.php
https://github.com/cosenary/Instagram-PHP-API/blob/master/src/Instagram.php
BSD-3-Clause
public function getLocation($id) { return $this->_makeCall('locations/' . $id, false); }
Get information about a location. @param int $id Instagram location ID @return mixed
getLocation
php
cosenary/Instagram-PHP-API
src/Instagram.php
https://github.com/cosenary/Instagram-PHP-API/blob/master/src/Instagram.php
BSD-3-Clause
public function getLocationMedia($id) { return $this->_makeCall('locations/' . $id . '/media/recent', false); }
Get recent media from a given location. @param int $id Instagram location ID @return mixed
getLocationMedia
php
cosenary/Instagram-PHP-API
src/Instagram.php
https://github.com/cosenary/Instagram-PHP-API/blob/master/src/Instagram.php
BSD-3-Clause
public function getOAuthToken($code, $token = false) { $apiData = array( 'grant_type' => 'authorization_code', 'client_id' => $this->getApiKey(), 'client_secret' => $this->getApiSecret(), 'redirect_uri' => $this->getApiCallback(), 'code' => $code ); $result = $this->_makeOAuthCall($apiData); return !$token ? $result : $result->access_token; }
Get the OAuth data of a user by the returned callback code. @param string $code OAuth2 code variable (after a successful login) @param bool $token If it's true, only the access token will be returned @return mixed
getOAuthToken
php
cosenary/Instagram-PHP-API
src/Instagram.php
https://github.com/cosenary/Instagram-PHP-API/blob/master/src/Instagram.php
BSD-3-Clause
private function _signHeader($endpoint, $authMethod, $params) { if (!is_array($params)) { $params = array(); } if ($authMethod) { list($key, $value) = explode('=', substr($authMethod, 1), 2); $params[$key] = $value; } $baseString = '/' . $endpoint; ksort($params); foreach ($params as $key => $value) { $baseString .= '|' . $key . '=' . $value; } $signature = hash_hmac('sha256', $baseString, $this->_apisecret, false); return $signature; }
Sign header by using endpoint, parameters and the API secret. @param string @param string @param array @return string The signature
_signHeader
php
cosenary/Instagram-PHP-API
src/Instagram.php
https://github.com/cosenary/Instagram-PHP-API/blob/master/src/Instagram.php
BSD-3-Clause
public function __construct(string $projectID, string $apiSecret, string $frontendAPI, string $backendAPI) { Assert::stringNotEmpty($projectID); Assert::stringNotEmpty($apiSecret); $this->assertURL($frontendAPI); $this->assertURL($backendAPI); if (!str_starts_with($projectID, 'pro-')) { throw new Exceptions\ConfigException('Invalid project ID "' . $projectID . '" given, needs to start with "pro-"'); } if (!str_starts_with($apiSecret, 'corbado1_')) { throw new Exceptions\ConfigException('Invalid API secret "' . $apiSecret . '" given, needs to start with "corbado1_"'); } $this->projectID = $projectID; $this->apiSecret = $apiSecret; $this->frontendAPI = $frontendAPI; $this->backendAPI = $backendAPI; }
Constructor Since project ID and API secret are always needed they are passed via the constructor. All other options can be set via setters. @throws AssertException @throws ConfigException
__construct
php
corbado/corbado-php
src/Config.php
https://github.com/corbado/corbado-php/blob/master/src/Config.php
MIT
public static function sanitizeTimestamp($timestamp) { if (!is_string($timestamp)) return $timestamp; return preg_replace('/(:\d{2}.\d{6})\d*/', '$1', $timestamp); }
Shorter timestamp microseconds to 6 digits length. @param string $timestamp Original timestamp @return string the shorten timestamp
sanitizeTimestamp
php
corbado/corbado-php
src/Generated/ObjectSerializer.php
https://github.com/corbado/corbado-php/blob/master/src/Generated/ObjectSerializer.php
MIT
public static function toString($value) { if ($value instanceof \DateTime) { // datetime in ISO8601 format return $value->format(self::$dateTimeFormat); } elseif (is_bool($value)) { return $value ? 'true' : 'false'; } else { return (string) $value; } }
Take value and turn it into a string suitable for inclusion in the parameter. If it's a string, pass through unchanged If it's a datetime object, format it in ISO8601 If it's a boolean, convert it to "true" or "false". @param float|int|bool|\DateTime $value the value of the parameter @return string the header string
toString
php
corbado/corbado-php
src/Generated/ObjectSerializer.php
https://github.com/corbado/corbado-php/blob/master/src/Generated/ObjectSerializer.php
MIT
public static function serializeCollection(array $collection, $style, $allowCollectionFormatMulti = false) { if ($allowCollectionFormatMulti && ('multi' === $style)) { // http_build_query() almost does the job for us. We just // need to fix the result of multidimensional arrays. return preg_replace('/%5B[0-9]+%5D=/', '=', http_build_query($collection, '', '&')); } switch ($style) { case 'pipeDelimited': case 'pipes': return implode('|', $collection); case 'tsv': return implode("\t", $collection); case 'spaceDelimited': case 'ssv': return implode(' ', $collection); case 'simple': case 'csv': // Deliberate fall through. CSV is default format. default: return implode(',', $collection); } }
Serialize an array to a string. @param array $collection collection to serialize to a string @param string $style the format use for serialization (csv, ssv, tsv, pipes, multi) @param bool $allowCollectionFormatMulti allow collection format to be a multidimensional array @return string
serializeCollection
php
corbado/corbado-php
src/Generated/ObjectSerializer.php
https://github.com/corbado/corbado-php/blob/master/src/Generated/ObjectSerializer.php
MIT
public function setBooleanFormatForQueryString(string $booleanFormat) { $this->booleanFormatForQueryString = $booleanFormat; return $this; }
Sets boolean format for query string. @param string $booleanFormat Boolean format for query string @return $this
setBooleanFormatForQueryString
php
corbado/corbado-php
src/Generated/Configuration.php
https://github.com/corbado/corbado-php/blob/master/src/Generated/Configuration.php
MIT
public function getHostSettings() { return [ [ "url" => "https://backendapi.corbado.io/v2", "description" => "No description provided", ] ]; }
Returns an array of host settings @return array an array of host settings
getHostSettings
php
corbado/corbado-php
src/Generated/Configuration.php
https://github.com/corbado/corbado-php/blob/master/src/Generated/Configuration.php
MIT
public static function getHostString(array $hostSettings, $hostIndex, array $variables = null) { if (null === $variables) { $variables = []; } // check array index out of bound if ($hostIndex < 0 || $hostIndex >= count($hostSettings)) { throw new \InvalidArgumentException("Invalid index $hostIndex when selecting the host. Must be less than ".count($hostSettings)); } $host = $hostSettings[$hostIndex]; $url = $host["url"]; // go through variable and assign a value foreach ($host["variables"] ?? [] as $name => $variable) { if (array_key_exists($name, $variables)) { // check to see if it's in the variables provided by the user if (!isset($variable['enum_values']) || in_array($variables[$name], $variable["enum_values"], true)) { // check to see if the value is in the enum $url = str_replace("{".$name."}", $variables[$name], $url); } else { throw new \InvalidArgumentException("The variable `$name` in the host URL has invalid value ".$variables[$name].". Must be ".join(',', $variable["enum_values"])."."); } } else { // use default value $url = str_replace("{".$name."}", $variable["default_value"], $url); } } return $url; }
Returns URL based on host settings, index and variables @param array $hostSettings array of host settings, generated from getHostSettings() or equivalent from the API clients @param int $hostIndex index of the host settings @param array|null $variables hash of variable and the corresponding value (optional) @return string URL based on host settings
getHostString
php
corbado/corbado-php
src/Generated/Configuration.php
https://github.com/corbado/corbado-php/blob/master/src/Generated/Configuration.php
MIT
public function getHostFromSettings($index, $variables = null) { return self::getHostString($this->getHostSettings(), $index, $variables); }
Returns URL based on the index and variables @param int $index index of the host settings @param array|null $variables hash of variable and the corresponding value (optional) @return string URL based on host settings
getHostFromSettings
php
corbado/corbado-php
src/Generated/Configuration.php
https://github.com/corbado/corbado-php/blob/master/src/Generated/Configuration.php
MIT
public function jsonSerialize() { return ObjectSerializer::sanitizeForSerialization($this); }
Serializes the object to a value that can be serialized natively by json_encode(). @link https://www.php.net/manual/en/jsonserializable.jsonserialize.php @return mixed Returns data which can be serialized by json_encode(), which is a value of any type other than a resource.
jsonSerialize
php
corbado/corbado-php
src/Generated/Model/PasskeyEvent.php
https://github.com/corbado/corbado-php/blob/master/src/Generated/Model/PasskeyEvent.php
MIT
public function toHeaderValue() { return json_encode(ObjectSerializer::sanitizeForSerialization($this)); }
Gets a header-safe presentation of the object @return string
toHeaderValue
php
corbado/corbado-php
src/Generated/Model/PasskeyEvent.php
https://github.com/corbado/corbado-php/blob/master/src/Generated/Model/PasskeyEvent.php
MIT
public function getCrossDeviceAuthenticationStrategy() { return $this->container['cross_device_authentication_strategy']; }
Gets cross_device_authentication_strategy @return \Corbado\Generated\Model\CrossDeviceAuthenticationStrategy
getCrossDeviceAuthenticationStrategy
php
corbado/corbado-php
src/Generated/Model/PasskeyLoginStartReq.php
https://github.com/corbado/corbado-php/blob/master/src/Generated/Model/PasskeyLoginStartReq.php
MIT
public function setCrossDeviceAuthenticationStrategy($cross_device_authentication_strategy) { if (is_null($cross_device_authentication_strategy)) { throw new \InvalidArgumentException('non-nullable cross_device_authentication_strategy cannot be null'); } $this->container['cross_device_authentication_strategy'] = $cross_device_authentication_strategy; return $this; }
Sets cross_device_authentication_strategy @param \Corbado\Generated\Model\CrossDeviceAuthenticationStrategy $cross_device_authentication_strategy cross_device_authentication_strategy @return self
setCrossDeviceAuthenticationStrategy
php
corbado/corbado-php
src/Generated/Model/PasskeyLoginStartReq.php
https://github.com/corbado/corbado-php/blob/master/src/Generated/Model/PasskeyLoginStartReq.php
MIT
function ncurses_timeout($millisec) {}
Set timeout for special key sequences @link https://php.net/manual/en/function.ncurses-timeout.php @param int $millisec <p> </p> @return void
ncurses_timeout
php
JetBrains/phpstorm-stubs
ncurses/ncurses.php
https://github.com/JetBrains/phpstorm-stubs/blob/master/ncurses/ncurses.php
Apache-2.0
function ncurses_use_env($flag) {}
Control use of environment information about terminal size @link https://php.net/manual/en/function.ncurses-use-env.php @param bool $flag <p> </p> @return void
ncurses_use_env
php
JetBrains/phpstorm-stubs
ncurses/ncurses.php
https://github.com/JetBrains/phpstorm-stubs/blob/master/ncurses/ncurses.php
Apache-2.0
function ncurses_addstr($text) {}
Output text at current position @link https://php.net/manual/en/function.ncurses-addstr.php @param string $text <p> </p> @return int
ncurses_addstr
php
JetBrains/phpstorm-stubs
ncurses/ncurses.php
https://github.com/JetBrains/phpstorm-stubs/blob/master/ncurses/ncurses.php
Apache-2.0