Наследование: use trait ScriptFUSION\StaticClass
Пример #1
0
 public function testEndsWith()
 {
     self::assertTrue(StringType::endsWith('foo', 'oo'));
     self::assertTrue(StringType::endsWith('foo', 'foo'));
     self::assertFalse(StringType::endsWith('foo', 'f'));
     self::assertFalse(StringType::endsWith('f', 'foo'));
 }
Пример #2
0
 /**
  * Find all headers matching the specified name.
  *
  * @param string $name Header name.
  *
  * @return array Headers.
  */
 public function findHeaders($name)
 {
     return array_filter($this->getHeaders(), function ($header) use($name) {
         return StringType::startsWith($header, "{$name}:");
     });
 }