Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F1431760
StringContains.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
850 B
Referenced Files
None
Subscribers
None
StringContains.php
View Options
<?php
namespace
Hamcrest\Text
;
/*
Copyright (c) 2009 hamcrest.org
*/
/**
* Tests if the argument is a string that contains a substring.
*/
class
StringContains
extends
SubstringMatcher
{
public
function
__construct
(
$substring
)
{
parent
::
__construct
(
$substring
);
}
public
function
ignoringCase
()
{
return
new
StringContainsIgnoringCase
(
$this
->
_substring
);
}
/**
* Matches if value is a string that contains $substring.
*
* @factory
*/
public
static
function
containsString
(
$substring
)
{
return
new
self
(
$substring
);
}
// -- Protected Methods
protected
function
evalSubstringOf
(
$item
)
{
return
(
false
!==
strpos
((
string
)
$item
,
$this
->
_substring
));
}
protected
function
relationship
()
{
return
'containing'
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sat, May 16, 21:02 (1 d, 15 h)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
08/23/07c38091d6176f9663b61eff9380
Default Alt Text
StringContains.php (850 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment