FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
enqueue-dev/pkg/test/WriteAttributeTrait.php at bench · php-enqueue/enqueue-dev · GitHub
Uh oh!
There was an error while loading.
Please reload this page
.
php-enqueue
/
enqueue-dev
Public
Notifications
You must be signed in to change notification settings
Fork
429
Star
2.2k
Code
Issues
36
Pull requests
26
Discussions
Actions
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Security and quality
Insights
Expand file tree
Breadcrumbs
enqueue-dev
/
pkg
/
test
/
WriteAttributeTrait.php
Copy path
More file actions
More file actions
Latest commit
History
History
History
19 lines (17 loc) · 459 Bytes
Breadcrumbs
enqueue-dev
/
pkg
/
test
/
WriteAttributeTrait.php
Copy path
File metadata and controls
19 lines (17 loc) · 459 Bytes
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?php
namespace
Enqueue
\
Test
;
trait
WriteAttributeTrait
{
/**
* @param object $object
* @param string $attribute
* @param mixed $value
*/
public
function
writeAttribute
(
$
object
,
$
attribute
,
$
value
)
{
$
refProperty
=
new
\
ReflectionProperty
(
get_class
(
$
object
),
$
attribute
);
$
refProperty
->
setAccessible
(
true
);
$
refProperty
->
setValue
(
$
object
,
$
value
);
$
refProperty
->
setAccessible
(
false
);
}
}
Back
|
FazBrowse Home
|
New Git URL