示例#1
0
 /**
  * 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']);
 }
示例#2
0
 /**
  * @expectedException PHPUnit_Framework_Error
  */
 public function testCreateExactWithTooFewArguments()
 {
     Splunk_Namespace::createExact('theapp', 'theowner');
 }