/** * Gets the non-wildcarded namespace in which this entity resides. * * @return Splunk_Namespace The non-wildcarded namespace in which this * entity resides. */ public function getNamespace() { // If this is an entity reference with an exact namespace, return it. if (!$this->loaded) { $effectiveNamespace = $this->namespace; if ($effectiveNamespace === NULL) { $effectiveNamespace = $this->service->getNamespace(); } if ($effectiveNamespace->isExact()) { return $effectiveNamespace; } } // Extract the namespace from this entity's content. $acl = $this['eai:acl']; return Splunk_Namespace::createExact($acl['owner'], $acl['app'], $acl['sharing']); }
/** * @expectedException PHPUnit_Framework_Error */ public function testCreateExactWithTooFewArguments() { Splunk_Namespace::createExact('theapp', 'theowner'); }