Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F5964159
StringDescription.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
StringDescription.php
View Options
<?php
namespace
Hamcrest
;
/*
Copyright (c) 2009 hamcrest.org
*/
/**
* A {@link Hamcrest\Description} that is stored as a string.
*/
class
StringDescription
extends
BaseDescription
{
private
$_out
;
public
function
__construct
(
$out
=
''
)
{
$this
->
_out
=
(
string
)
$out
;
}
public
function
__toString
()
{
return
$this
->
_out
;
}
/**
* Return the description of a {@link Hamcrest\SelfDescribing} object as a
* String.
*
* @param \Hamcrest\SelfDescribing $selfDescribing
* The object to be described.
*
* @return string
* The description of the object.
*/
public
static
function
toString
(
SelfDescribing
$selfDescribing
)
{
$self
=
new
self
();
return
(
string
)
$self
->
appendDescriptionOf
(
$selfDescribing
);
}
/**
* Alias for {@link toString()}.
*/
public
static
function
asString
(
SelfDescribing
$selfDescribing
)
{
return
self
::
toString
(
$selfDescribing
);
}
// -- Protected Methods
protected
function
append
(
$str
)
{
$this
->
_out
.=
$str
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, Oct 3, 10:07 (1 w, 2 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
1f/a3/8e093c8dc31425e343ab2fa628d6
Default Alt Text
StringDescription.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment