Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F630319
Entity.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
778 B
Referenced Files
None
Subscribers
None
Entity.php
View Options
<?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.
*/
namespace
Longman
\
TelegramBot
\
Entities
;
class
Entity
{
public
function
toJSON
(
)
{
$reflection
=
new
\
ReflectionObject
(
$this
)
;
$properties
=
$reflection
->
getProperties
(
)
;
$fields
=
array
(
)
;
foreach
(
$properties
as
$property
)
{
$name
=
$property
->
getName
(
)
;
$property
->
setAccessible
(
true
)
;
$value
=
$property
->
getValue
(
$this
)
;
$fields
[
$name
]
=
$value
;
}
$json
=
json_encode
(
$fields
)
;
return
$json
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 15, 9:12 AM (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
140295
Default Alt Text
Entity.php (778 B)
Attached To
Mode
R123 php-telegram-bot
Attached
Detach File
Event Timeline