adicionada documentação na nova estrutura do urlanalyzer

This commit is contained in:
Renan Bernordi 2025-01-30 01:45:29 -03:00
parent 91f58e61c7
commit db4e512e63
7 changed files with 120 additions and 3 deletions

View file

@ -1,12 +1,20 @@
<?php
/**
* Custom exceptions for URL analysis
* Adds error type and extra details
*/
namespace Inc\URLAnalyzer;
class URLAnalyzerException extends \Exception
{
/** @var string Error type from ERROR_* constants */
private $errorType;
/** @var string Extra error details */
private $additionalInfo;
/** Creates new exception with error details */
public function __construct($message, $code, $errorType, $additionalInfo = '')
{
parent::__construct($message, $code);
@ -14,11 +22,13 @@ class URLAnalyzerException extends \Exception
$this->additionalInfo = $additionalInfo;
}
/** Gets error type */
public function getErrorType()
{
return $this->errorType;
}
/** Gets extra error details */
public function getAdditionalInfo()
{
return $this->additionalInfo;