/** * Constructor. The given URI must not contain serialization-specific * abbreviations or escapings, such as XML entities. * * @param string $localName Local part of the abbreviated URI * @param string $namespace Namespace URI prefix of the abbreviated URI * @param string $namespaceId Namespace abbreviation of the abbreviated URI * @param SMWDataItem|null $dataItem * * @throws InvalidArgumentException */ public function __construct($localName, $namespace, $namespaceId, SMWDataItem $dataItem = null) { if (!is_string($localName)) { throw new InvalidArgumentException('$localName needs to be a string'); } if (!is_string($namespace)) { throw new InvalidArgumentException('$namespace needs to be a string'); } if (!is_string($namespaceId)) { throw new InvalidArgumentException('$namespaceId needs to be a string'); } parent::__construct($namespace . $localName, $dataItem); $this->namespace = $namespace; $this->namespaceId = $namespaceId; $this->localName = $localName; }
/** * Constructor. The given URI must not contain serialization-specific * abbreviations or escapings, such as XML entities. * * @param $localname string local part of the abbreviated URI * @param $namespace string namespace URI prefix of the abbreviated URI * @param $namespaceid string namespace abbreviation of the abbreviated URI * @param $dataItem SMWDataItem or null */ public function __construct($localname, $namespace, $namespaceid, $dataItem = null) { parent::__construct($namespace . $localname, $dataItem); $this->m_namespace = $namespace; $this->m_namespaceid = $namespaceid; $this->m_localname = $localname; }