2020-06-23 15:01:20 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Appwrite\Utopia\Response\Model;
|
|
|
|
|
|
|
|
|
|
use Appwrite\Utopia\Response;
|
|
|
|
|
|
|
|
|
|
class ErrorDev extends Error
|
|
|
|
|
{
|
2020-11-12 22:50:53 +00:00
|
|
|
/**
|
|
|
|
|
* @var bool
|
|
|
|
|
*/
|
|
|
|
|
protected $public = false;
|
|
|
|
|
|
2020-06-23 15:01:20 +00:00
|
|
|
public function __construct()
|
|
|
|
|
{
|
|
|
|
|
parent::__construct();
|
|
|
|
|
|
|
|
|
|
$this
|
|
|
|
|
->addRule('file', [
|
2020-11-07 22:14:48 +00:00
|
|
|
'type' => self::TYPE_STRING,
|
2020-06-23 15:01:20 +00:00
|
|
|
'description' => 'File path.',
|
2021-01-13 15:06:36 +00:00
|
|
|
'default' => '',
|
2020-07-02 13:59:51 +00:00
|
|
|
'example' => '/usr/code/vendor/utopia-php/framework/src/App.php',
|
2020-06-23 15:01:20 +00:00
|
|
|
])
|
|
|
|
|
->addRule('line', [
|
2020-11-07 22:14:48 +00:00
|
|
|
'type' => self::TYPE_INTEGER,
|
2020-06-23 15:01:20 +00:00
|
|
|
'description' => 'Line number.',
|
2021-01-13 15:06:36 +00:00
|
|
|
'default' => 0,
|
2020-06-23 15:01:20 +00:00
|
|
|
'example' => 209,
|
|
|
|
|
])
|
2020-07-03 03:11:16 +00:00
|
|
|
->addRule('trace', [
|
2020-11-07 22:14:48 +00:00
|
|
|
'type' => self::TYPE_STRING,
|
2020-07-03 03:11:16 +00:00
|
|
|
'description' => 'Error trace.',
|
2021-01-13 15:06:36 +00:00
|
|
|
'default' => [],
|
2021-02-01 21:31:54 +00:00
|
|
|
'example' => '',
|
|
|
|
|
'array' => true,
|
2020-07-03 03:11:16 +00:00
|
|
|
])
|
2020-06-23 15:01:20 +00:00
|
|
|
;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Get Collection
|
2021-10-06 14:22:38 +00:00
|
|
|
*
|
2020-06-23 15:01:20 +00:00
|
|
|
* @return string
|
|
|
|
|
*/
|
|
|
|
|
public function getType():string
|
|
|
|
|
{
|
|
|
|
|
return Response::MODEL_ERROR_DEV;
|
|
|
|
|
}
|
2021-10-06 14:22:38 +00:00
|
|
|
}
|