Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix invalid namespaces #110

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ class CallbackApiMyHandler extends VK\CallbackApi\VKCallbackApiHandler {
```

To start listening to LongPoll events, create an instance of your CallbackApiMyHandler class, instance of
VK\CallbackApi\LongPoll\VKCallbackApiLongPollExecutor class and call method listen():
VK\CallbackApi\VKCallbackApiLongPollExecutor class and call method listen():

```php
$vk = new \VK\Client\VKApiClient();
Expand Down Expand Up @@ -345,8 +345,7 @@ $data = json_decode(file_get_contents('php://input'));
$handler->parse($data);
```

To handle events you need to override methods from VK\CallbackApi\Server\VKCallbackApiServerHandler class as shown
To handle events you need to override methods from VK\CallbackApi\VKCallbackApiServerHandler class as shown
above.

`confirmation` event handler has 2 arguments: group id, and secret key. You need to override this method.

2 changes: 1 addition & 1 deletion src/VK/CallbackApi/VKCallbackApiLongPollExecutor.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Generator\Skeleton\skeleton\base\src\VK\CallbackApi;
namespace VK\CallbackApi;

use GuzzleHttp\Client;
use GuzzleHttp\Exception\GuzzleException;
Expand Down
4 changes: 1 addition & 3 deletions src/VK/CallbackApi/VKCallbackApiServerHandler.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?php

namespace Generator\Skeleton\skeleton\base\src\VK\CallbackApi;

use VK\CallbackApi\VKCallbackApiHandler;
namespace VK\CallbackApi;

abstract class VKCallbackApiServerHandler extends VKCallbackApiHandler {
protected const EVENT_KEY_TYPE = 'type';
Expand Down