mirror of
https://github.com/php-curl-class/php-curl-class.git
synced 2026-08-30 04:01:47 +00:00
Update script to work with base class
This commit is contained in:
@@ -365,7 +365,7 @@ MultiCurl::stop()
|
||||
MultiCurl::success($callback)
|
||||
MultiCurl::unsetHeader($key)
|
||||
MultiCurl::unsetProxy()
|
||||
MultiCurl::verbose($on = true, $output = STDERR)
|
||||
MultiCurl::verbose($on = true, $output = 'STDERR')
|
||||
```
|
||||
|
||||
### Security
|
||||
|
||||
@@ -11,10 +11,33 @@ after=$(tail -n +$(
|
||||
|
||||
echo "${before}" > "README.md"
|
||||
|
||||
basecurl_path="src/Curl/BaseCurl.php"
|
||||
curl_path="src/Curl/Curl.php"
|
||||
multicurl_path="src/Curl/MultiCurl.php"
|
||||
|
||||
echo '```php' >> "README.md"
|
||||
find "src/Curl" -type f -name "*Curl*" |
|
||||
sort |
|
||||
xargs -L 1 -I {} bash -c 'class_name="$(basename --suffix=".php" "{}")" && egrep "^ .* function .*" "{}" | egrep "^ public" | sort | perl -pe "s/^ public (.* )?function /${class_name}::/"' >> "README.md"
|
||||
|
||||
curl_class_name="$(basename --suffix=".php" "${curl_path}")" &&
|
||||
curl_fns="$(
|
||||
grep --extended-regexp "^ .* function .*" "${curl_path}" |
|
||||
grep --extended-regexp "^ public" |
|
||||
perl -pe "s/^ public (.* )?function /${curl_class_name}::/")"
|
||||
|
||||
multicurl_class_name="$(basename --suffix=".php" "${multicurl_path}")" &&
|
||||
multicurl_fns="$(
|
||||
grep --extended-regexp "^ .* function .*" "${multicurl_path}" |
|
||||
grep --extended-regexp "^ public" |
|
||||
perl -pe "s/^ public (.* )?function /${multicurl_class_name}::/")"
|
||||
|
||||
common_fns="$(
|
||||
grep --extended-regexp "^ .* function .*" "${basecurl_path}" |
|
||||
grep --extended-regexp "^ public" |
|
||||
perl -pe "s/^ public .* ?function (.*)/Curl::\1\nMultiCurl::\1/")"
|
||||
|
||||
echo "${curl_fns}
|
||||
${multicurl_fns}
|
||||
${common_fns}" | sort >> "README.md"
|
||||
|
||||
echo '```' >> "README.md"
|
||||
echo >> "README.md"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user