Represents a namespace.

Every Splunk object belongs to a namespace.

package Splunk

 Methods

Creates the non-global namespace containing objects associated with the specified application.

createApp(string | NULL $app) : \Splunk_Namespace
Static

Parameters

$app

stringNULL

name of a Splunk app (ex: "search"), or NULL to specify all apps.

Returns

Creates the default namespace.

createDefault() : \Splunk_Namespace
Static

Objects in the default namespace correspond to the authenticated user and their default Splunk application.

Returns

Creates a non-wildcarded namespace with the specified properties.

createExact(string $owner, string $app, string $sharing) 
Static
see \user()

Parameters

$owner

string

name of a Splunk user (ex: "admin").

$app

string

name of a Splunk app (ex: "search").

$sharing

string

one of {'user', 'app', 'global', 'system'}.

Creates the global namespace containing objects associated with the specified application.

createGlobal(string | NULL $app) : \Splunk_Namespace
Static

Parameters

$app

stringNULL

name of a Splunk app (ex: "search"), or NULL to specify all apps.

Returns

Creates the system namespace.

createSystem() : \Splunk_Namespace
Static

Objects in the system namespace ship with Splunk.

Returns

Creates the namespace containing objects associated with the specified user and application.

createUser(string | NULL $owner, string | NULL $app) : \Splunk_Namespace
Static

Parameters

$owner

stringNULL

name of a Splunk user (ex: "admin"), or NULL to specify all users.

$app

stringNULL

name of a Splunk app (ex: "search"), or NULL to specify all apps.

Returns

Returns the app associated with objects in this namespace.

getApp() 

This operation is only defined for exact namespaces.

Returns the user who owns objects in this namespace.

getOwner() 

This operation is only defined for exact namespaces.

Returns the path prefix to use when referencing objects in this namespace.

getPathPrefix() 

Returns the sharing mode of this namespace.

getSharing() 

This operation is only defined for exact namespaces.

Returns whether this is an exact (non-wildcarded) namespace.

isExact() 

Within an exact namespace, no two objects can have the same name.

Constructs a new namespace with the specified parameters.

__construct($owner, $app, $sharing) 

Parameters

$owner

$app

$sharing

Throws an exception if the number of arguments is not what was expected.

ensureArgumentCountEquals($expected, $actual) 
Static

Parameters

$expected

$actual

Throws an exception if this namespace is not an exact (non-wildcarded) namespace.

ensureExact() 

 Properties

 

$app 
 

$owner 
 

$sharing