mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-09-11 10:56:29 +00:00
Fix #223: Update README with available methods
This commit is contained in:
@@ -215,6 +215,7 @@ MultiCurl::setBasicAuthentication($username, $password = '')
|
||||
MultiCurl::setCookie($key, $value)
|
||||
MultiCurl::setCookieFile($cookie_file)
|
||||
MultiCurl::setCookieJar($cookie_jar)
|
||||
MultiCurl::setDigestAuthentication($username, $password = '')
|
||||
MultiCurl::setHeader($key, $value)
|
||||
MultiCurl::setJsonDecoder($function)
|
||||
MultiCurl::setOpt($option, $value)
|
||||
|
||||
Executable
+28
@@ -0,0 +1,28 @@
|
||||
before=$(head -n $(
|
||||
grep --context="0" --line-number --max-count="1" "### Available Methods" "README.md" |
|
||||
perl -pe 's/^(\d+):.*/\1/') "README.md")
|
||||
|
||||
after=$(tail -n +$(
|
||||
grep --context="0" --line-number --max-count="1" "### Contribute" "README.md" |
|
||||
perl -pe 's/^(\d+):.*/\1/') "README.md")
|
||||
|
||||
echo "${before}" > "README.md"
|
||||
|
||||
curl_max_line_number=$(grep --context="0" --line-number --max-count="1" '^}$' "src/Curl/Curl.php" | \
|
||||
perl -pe 's/^(\d+):.*/\1/')
|
||||
echo '```php' >> "README.md"
|
||||
head -n "${curl_max_line_number}" "src/Curl/Curl.php" | \
|
||||
egrep "^ .* function .*" | \
|
||||
egrep "^ public" | \
|
||||
sort | \
|
||||
perl -pe 's/^ public (.* )?function /Curl::/' | \
|
||||
tee -a "README.md"
|
||||
egrep "^ .* function .*" "src/Curl/MultiCurl.php" | \
|
||||
egrep "^ public" | \
|
||||
sort | \
|
||||
perl -pe 's/^ public (.* )?function /MultiCurl::/' | \
|
||||
tee -a "README.md"
|
||||
echo '```' >> "README.md"
|
||||
echo >> "README.md"
|
||||
|
||||
echo "${after}" >> "README.md"
|
||||
Reference in New Issue
Block a user