Skip to content

Instantly share code, notes, and snippets.

Dmitry Patsura ovr

View GitHub Profile
@ovr
ovr / Переизобретая Асинхроность ссылочки
Last active March 15, 2020 20:00
Переизобретая Асинхроность ссылочки
Обо мне
Twitter - https://twitter.com/ovrweb
UnderJS Podcast https://underjs.ru/
Доклад - https://www.icloud.com/keynote/0gKSWDvy_lmWLQDUUJjt5wqwA#async
Ссылки по докладу
- Библиотека - https://github.com/ovr/async-std
- Кольцо-защиты https://ru.wikipedia.org/wiki/%D0%9A%D0%BE%D0%BB%D1%8C%D1%86%D0%B0_%D0%B7%D0%B0%D1%89%D0%B8%D1%82%D1%8B
<?php
$client = new SimpleClient(
new HttpStack(
new \Zend\Diactoros\RequestFactory(),
new \Zend\Diactoros\StreamFactory()
)
);
$request = $client->createRequest('GET', 'https://api.github.com/users/ovr');
<?php
class RequestBuilder
{
/**
* @var HttpStack
*/
private $httpStack;
/**
@ovr
ovr / http-stack.php
Created July 14, 2019 10:52
Combining RequestFactoryInterface, StreamFactoryInterface from PSR-17
<?php
use Psr\Http\Message\RequestFactoryInterface;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\StreamFactoryInterface;
use Psr\Http\Message\StreamInterface;
class HttpStack implements RequestFactoryInterface, StreamFactoryInterface
{
/**
@ovr
ovr / client.php
Last active July 14, 2019 09:11
PSR-18 HTTP-client with PSR-17 ResponseFactoryInterface for Response
<?php
use Psr\Http\Client\ClientInterface;
use Psr\Http\Message\RequestInterface;
use Psr\Http\Message\ResponseFactoryInterface;
use Psr\Http\Message\ResponseInterface;
class Client implements ClientInterface {
/**
* @var ResponseFactoryInterface
@ovr
ovr / gist:7bba0c7a079b7bbc320c5b01c39140b5
Created January 16, 2019 23:01 — forked from jestan/gist:4411538
MAP Protocol Error Codes

MAP Protocol Error Codes

Generic errors

34 System failure

35 Data Missing

36 Unexpected Data Value

21 Facility Not Supported

@ovr
ovr / links.md
Last active September 14, 2021 11:39
04e67d1d577dd6bafbf379104598ad801730dcfddcb3b26e3758bffb7f28db3ac9c8df8eb5949fb0f57f8a5200c357c55c245c51630238d94e77eaed5aabb8159b
<?php
class OauthCbController extends AbstractController
{
/**
* @Inject("SocialConnect\Auth\Service")
*
* @var \SocialConnect\Auth\Service
*/
protected $oauth;
<?php
class OauthController extends AbstractController
{
/**
* @Inject("SocialConnect\Auth\Service")
*
* @var \SocialConnect\Auth\Service
*/
protected $oauth;