/** * Check if the header field has a mapping class. * @param string $headerFieldName * @return boolean */ public function hasClass($headerFieldName) { Assert::isStringOrInteger($headerFieldName); return isset($this->map[$headerFieldName]); }
/** {@inheritDoc} */ public function has($adapterIdentifier) { Assert::isStringOrInteger($adapterIdentifier); return in_array($adapterIdentifier, $this->mappingKeys, false); }
/** * Removes the container entry by its key. * @param string|integer $key * @throws \InvalidArgumentException * @return \Brickoo\Component\Common\Container */ public function remove($key) { Assert::isStringOrInteger($key); if ($this->contains($key)) { unset($this->container[$key]); } return $this; }
/** * @covers Brickoo\Component\Common\Assert::isStringOrInteger * @expectedException \InvalidArgumentException */ public function testIsStringOrIntegerThrowsInvalidArgumentException() { Assert::isStringOrInteger(array("wrongType")); }
/** * Check if the identifier is registered. * @param string $identifier the identifier to check * @return boolean */ public function isRegistered($identifier) { Assert::isStringOrInteger($identifier); return array_key_exists($identifier, $this->registrations); }