Page MenuHomeWickedGov Phorge

StringContains.php
No OneTemporary

Size
850 B
Referenced Files
None
Subscribers
None

StringContains.php

<?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

Mime Type
text/x-php
Expires
Sat, Nov 21, 17:02 (1 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
37/89/5275eb939a36dee0b80513cb6483
Default Alt Text
StringContains.php (850 B)

Event Timeline