-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
22 changed files
with
276 additions
and
155 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,17 +10,17 @@ | |
* @author aidsoul <[email protected]> | ||
* @license MIT | ||
*/ | ||
class Post extends Database implements PostInterface | ||
class PostModel extends Database implements PostInterface | ||
{ | ||
/** | ||
* @param string $tableName | ||
* @param string $idPost | ||
* @param string $groupId | ||
*/ | ||
public function __construct( | ||
private readonly string $tableName = 'post', | ||
private readonly string $idPost = 'id_post', | ||
private readonly string $groupId = 'group_id' | ||
private string $tableName = 'post', | ||
private string $idPost = 'id_post', | ||
private string $groupId = 'group_id' | ||
) { | ||
parent::__construct(); | ||
} | ||
|
@@ -47,7 +47,8 @@ public function create(int $postId, int $groupId): void | |
* | ||
* @param integer $postId | ||
* @param integer $groupId | ||
* @return integer | ||
* | ||
* @return int|bool | ||
*/ | ||
public function check(int $postId, int $groupId): int|bool | ||
{ | ||
|
@@ -67,7 +68,8 @@ public function check(int $postId, int $groupId): int|bool | |
* Get last post | ||
* | ||
* @param integer $groupId | ||
* @return void | ||
* | ||
* @return int | ||
*/ | ||
public function getLastPost(string $groupName): int | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,24 +10,25 @@ | |
* @author aidsoul <[email protected]> | ||
* @license MIT | ||
*/ | ||
class Vkgroup extends Database implements VkgroupInterface | ||
class VkgroupModel extends Database implements VkgroupInterface | ||
{ | ||
/** | ||
* @param string $tableName | ||
* @param string $idGroup | ||
* @param string $name | ||
*/ | ||
public function __construct( | ||
private readonly string $tableName = 'vkgroup', | ||
private readonly string $idGroup = 'id_group', | ||
private readonly string $name = 'name' | ||
private string $tableName = 'vkgroup', | ||
private string $idGroup = 'id_group', | ||
private string $name = 'name' | ||
|
||
) { | ||
parent::__construct(); | ||
} | ||
|
||
/** | ||
* @param string $nameGroup | ||
* | ||
* @return void | ||
*/ | ||
public function create(string $nameGroup): void | ||
|
@@ -41,6 +42,7 @@ public function create(string $nameGroup): void | |
|
||
/** | ||
* @param string $nameGroup | ||
* | ||
* @return integer|boolean | ||
*/ | ||
public function check(string $nameGroup): int|bool | ||
|
@@ -58,6 +60,7 @@ public function check(string $nameGroup): int|bool | |
|
||
/** | ||
* @param integer|string $idGroup | ||
* | ||
* @return void | ||
*/ | ||
public function remove(int|string $idGroup): void | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,14 +4,20 @@ | |
|
||
use Vktote\Telegram\Html\Link; | ||
|
||
/** | ||
* Class Author | ||
* | ||
* @author aidsoul [email protected] | ||
* @license MIT | ||
*/ | ||
class Author | ||
{ | ||
/** | ||
* @param integer $author | ||
* | ||
* @return string | ||
*/ | ||
public static function change(int $author): string | ||
public function change(int $author): string | ||
{ | ||
$link = 'https://vk.com/id'; | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
namespace Vktote\Telegram\Functions; | ||
|
||
/** | ||
* Class Function Factory | ||
* | ||
* @author aidsoul [email protected] | ||
* @license MIT | ||
*/ | ||
class FunctionFactory | ||
{ | ||
public function video() | ||
{ | ||
return new Video(); | ||
} | ||
|
||
public function link() | ||
{ | ||
return new link(); | ||
} | ||
|
||
public function text() | ||
{ | ||
return new Text(); | ||
} | ||
|
||
public function author() | ||
{ | ||
return new Author(); | ||
} | ||
} |
Oops, something went wrong.