ApiException
extends FrameworkException
in package
FinalYes
Custom exception for API-related errors.
Table of Contents
Methods
- __construct() : mixed
- Tweaks the exception's constructor to assign the file/line to where it is actually raised rather than were it is instantiated.
- forCopyError() : static
- forEnabledZlibOutputCompression() : static
- forFabricatorCreateFailed() : static
- forInvalidDirectory() : static
- forInvalidFields() : self
- Thrown when the fields requested in a URL are not valid.
- forInvalidFile() : static
- forInvalidIncludes() : self
- Thrown when the includes requested in a URL are not valid.
- forInvalidTransformer() : self
- Thrown when a transformer class does not implement TransformerInterface.
- forMissingExtension() : static
- forMissingInclude() : self
- Thrown when an include is requested, but the method to handle it does not exist on the model.
- forNoHandlers() : static
- forTransformerNotFound() : self
- Thrown when a transformer class cannot be found.
Methods
__construct()
Tweaks the exception's constructor to assign the file/line to where it is actually raised rather than were it is instantiated.
public
final __construct([string $message = '' ][, int $code = 0 ][, Throwable|null $previous = null ]) : mixed
Parameters
- $message : string = ''
- $code : int = 0
- $previous : Throwable|null = null
forCopyError()
public
static forCopyError(string $path) : static
Parameters
- $path : string
Return values
staticforEnabledZlibOutputCompression()
public
static forEnabledZlibOutputCompression() : static
Return values
staticforFabricatorCreateFailed()
public
static forFabricatorCreateFailed(string $table, string $reason) : static
Parameters
- $table : string
- $reason : string
Return values
staticforInvalidDirectory()
public
static forInvalidDirectory(string $path) : static
Parameters
- $path : string
Return values
staticforInvalidFields()
Thrown when the fields requested in a URL are not valid.
public
static forInvalidFields(string $field) : self
Parameters
- $field : string
Return values
selfforInvalidFile()
public
static forInvalidFile(string $path) : static
Parameters
- $path : string
Return values
staticforInvalidIncludes()
Thrown when the includes requested in a URL are not valid.
public
static forInvalidIncludes(string $include) : self
Parameters
- $include : string
Return values
selfforInvalidTransformer()
Thrown when a transformer class does not implement TransformerInterface.
public
static forInvalidTransformer(string $transformerClass) : self
Parameters
- $transformerClass : string
Return values
selfforMissingExtension()
public
static forMissingExtension(string $extension) : static
No longer used.
Parameters
- $extension : string
Return values
staticforMissingInclude()
Thrown when an include is requested, but the method to handle it does not exist on the model.
public
static forMissingInclude(string $include) : self
Parameters
- $include : string
Return values
selfforNoHandlers()
public
static forNoHandlers(string $class) : static
Parameters
- $class : string
Return values
staticforTransformerNotFound()
Thrown when a transformer class cannot be found.
public
static forTransformerNotFound(string $transformerClass) : self
Parameters
- $transformerClass : string