Skip to documentation

InvalidArgumentException

Class
extends InvalidArgumentException
Final: Yes

Class InvalidArgumentException.

Description

Specialized exception for handling invalid arguments within the configuration context. This class SHALL be used to provide meaningful errors when invalid data is passed to configuration components.

Table of Contents

Methods

forEmptyPath()

Thrown when a configuration lookup path is empty.

 : self
forInvalidConfigFile()

Thrown when a configuration file does not return an array.

 : self
forNonStringKeyWithValue()

Thrown when the key is not a string but a value is provided.

 : self
forUnreadableDirectory()

Thrown when a given directory does not exist or is not readable.

 : self
forUnreadableFile()

Thrown when a given file does not exist or is not readable.

 : self
forUnwritableFile()

Thrown when a configuration file is not writable.

 : self
Methods

forEmptyPath()

Public Static

Thrown when a configuration lookup path is empty.

public static forEmptyPath() : self
Return values
self

Description

the exception indicating the path cannot be empty

forInvalidConfigFile()

Public Static

Thrown when a configuration file does not return an array.

public static forInvalidConfigFile( string  $file) : self
Parameters
$file : string

Description

the path to the configuration file

Return values
self

Description

the exception indicating an invalid configuration file

forNonStringKeyWithValue()

Public Static

Thrown when the key is not a string but a value is provided.

public static forNonStringKeyWithValue() : self
Return values
self

Description

the exception indicating the key must be a string

forUnreadableDirectory()

Public Static

Thrown when a given directory does not exist or is not readable.

public static forUnreadableDirectory( string  $directory) : self
Parameters
$directory : string

Description

the path to the invalid directory

Return values
self

Description

the exception indicating an invalid or unreadable directory

forUnreadableFile()

Public Static

Thrown when a given file does not exist or is not readable.

public static forUnreadableFile( string  $file) : self
Parameters
$file : string

Description

the path to the invalid file

Return values
self

Description

the exception indicating an invalid or unreadable file

forUnwritableFile()

Public Static

Thrown when a configuration file is not writable.

public static forUnwritableFile( string  $file) : self
Parameters
$file : string

Description

the path to the unwritable file

Return values
self

Description

the exception indicating an unwritable file

Search results