I hereby claim:
- I am jeremeamia on github.
- I am jeremeamia (https://keybase.io/jeremeamia) on keybase.
- I have a public key ASCBfb8yAYogwzk5U3UqoPp1oPzXnIUTnCk-9QG7IeIJTQo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| <?php | |
| function parse_slack_request(string $body): array | |
| { | |
| if (empty($body)) { | |
| return []; | |
| } | |
| if ($body[0] === '{') { | |
| $data = json_decode($body, true); |
| function glob_recursive(string $dir, string $pattern, int $flags = GLOB_BRACE): Iterator | |
| { | |
| $path = realpath($dir); | |
| if ($path === false) { | |
| throw new RuntimeException("Invalid dir: {$dir}"); | |
| } | |
| $glob = function (string $path) use ($pattern, $flags, &$glob) { | |
| yield from glob("{$path}/{$pattern}", $flags); | |
| foreach (new DirectoryIterator($path) as $file) { |
| package main | |
| import ( | |
| "fmt" | |
| "reflect" | |
| "strings" | |
| ) | |
| type MyUrlParams struct { | |
| UserId string `path:"user",json:"-"` |
composer init for initial setup| <?php | |
| namespace fn { | |
| use Closure as Fn; | |
| use InvalidArgumentException as IAE; | |
| const SKIP = "\0...\0"; | |
| /** | |
| * @param callable $fn |
| <?php | |
| /** | |
| * Create an instance of the Amazon S3 driver. | |
| * | |
| * @param array $config | |
| * @return \Illuminate\Contracts\Filesystem\Cloud | |
| */ | |
| public function createS3Driver(array $config) | |
| { |
References to Promise classes and functions are related to this library: guzzle/promises.
| <?php | |
| // Require composer autoloader after installing superclosure 2.0. | |
| require '/vendor/autoload.php'; | |
| class ClosureCreator | |
| { | |
| public function getClosures() | |
| { | |
| $f1 = function () {}; |
| <?php | |
| namespace Aws\DynamoDb; | |
| /** | |
| * Marshals JSON documents or array representations of JSON documents into the | |
| * parameter structure required by DynamoDB. Also allows for unmarshaling. Does | |
| * not support binary (B) or set (*S) types, since they are not supported | |
| * explicitly in JSON. | |
| */ | |
| class Marshaler |