Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
TelegramBot
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kulya
TelegramBot
Commits
dc15c4c1
Commit
dc15c4c1
authored
Jul 18, 2015
by
MBoretto
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Delete unuseful file
parent
e44202be
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
75 deletions
+0
-75
ReplyMarkup.php
src/Entities/ReplyMarkup.php
+0
-75
No files found.
src/Entities/ReplyMarkup.php
deleted
100644 → 0
View file @
e44202be
<?php
/*
* This file is part of the TelegramBot package.
*
* (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
* Written by Marco Boretto <marco.bore@gmail.com>
*/
namespace
Longman\TelegramBot\Entities
;
use
Longman\TelegramBot\Exception\TelegramException
;
class
ReplyMarkup
extends
Entity
{
protected
$reply_markup_array
;
public
function
__construct
()
{
$this
->
reply_markup_array
=
array
();
}
public
function
addKeyBoard
(
$options
,
$resize
=
false
,
$once
=
false
,
$selective
=
false
)
{
if
(
is_array
(
$options
))
{
$list
=
array
();
foreach
(
$options
as
$item
)
{
if
(
is_array
(
$item
))
{
$list
[]
=
$item
;
}
else
{
$list
[]
=
array
(
$item
);
}
}
$this
->
reply_markup_array
[
'keyboard'
]
=
$list
;
if
(
$resize
==
true
)
{
$this
->
reply_markup_array
[
'resize_keyboard'
]
=
true
;
}
if
(
$once
==
true
)
{
$this
->
reply_markup_array
[
'one_time_keyboard'
]
=
true
;
}
$this
->
addSelective
(
$selective
);
return
true
;
}
return
false
;
}
public
function
addKeyBoardHide
(
$selective
=
false
)
{
$this
->
reply_markup_array
[
'hide_keyboard'
]
=
true
;
$this
->
addSelective
(
$selective
);
}
public
function
addForceReply
(
$selective
=
false
)
{
$this
->
reply_markup_array
[
'force_reply'
]
=
true
;
$this
->
addSelective
(
$selective
);
}
protected
function
addSelective
(
$selective
=
false
)
{
if
(
$selective
==
true
)
{
$this
->
reply_markup_array
[
'selective'
]
=
true
;
}
}
public
function
getJsonQuery
()
{
return
json_encode
(
$this
->
reply_markup_array
);
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment