Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1429839
ElementProxyTrait.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
ElementProxyTrait.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
Phan\Language\Element
;
use
Phan\Language\FileRef
;
use
Phan\Language\UnionType
;
/**
* Trait for classes that wrap an element and proxy
* calls to that element.
* @property UnionType $type
* @phan-file-suppress PhanPluginNoCommentOnPublicMethod Undocumented methods are simple proxies
* @phan-file-suppress PhanUnreferencedPublicMethod
*/
trait
ElementProxyTrait
{
/**
* The element that was passed in as an argument (e.g. variable or static property)
* @var TypedElement|UnaddressableTypedElement
* TODO: Make a common interface which has methods implemented
*/
private
$element
;
/**
* @param TypedElement|UnaddressableTypedElement $element
*/
public
function
__construct
(
$element
)
{
$this
->
element
=
$element
;
$this
->
type
=
$element
->
getUnionType
();
}
public
function
getFlags
():
int
{
return
$this
->
element
->
getFlags
();
}
public
function
getFlagsHasState
(
int
$bits
):
bool
{
return
$this
->
element
->
getFlagsHasState
(
$bits
);
}
public
function
setFlags
(
int
$flags
):
void
{
$this
->
element
->
setFlags
(
$flags
);
}
public
function
getPhanFlags
():
int
{
return
$this
->
element
->
getPhanFlags
();
}
public
function
getPhanFlagsHasState
(
int
$bits
):
bool
{
return
$this
->
element
->
getPhanFlagsHasState
(
$bits
);
}
public
function
setPhanFlags
(
int
$phan_flags
):
void
{
$this
->
element
->
setPhanFlags
(
$phan_flags
);
}
public
function
getFileRef
():
FileRef
{
return
$this
->
element
->
getFileRef
();
}
/**
* Get the argument passed in to this object.
* @return TypedElement|UnaddressableTypedElement
*/
public
function
getElement
()
{
return
$this
->
element
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 18:05 (9 h, 1 m)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
5b/bb/11ac51a13bf7cdb72cc5e6cc15c1
Default Alt Text
ElementProxyTrait.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment