1
0
Fork 0
mirror of synced 2024-06-01 18:39:57 +12:00
appwrite/src/Appwrite/Utopia/Response/Model/ErrorDev.php
2021-12-15 11:19:29 +01:00

51 lines
1.1 KiB
PHP

<?php
namespace Appwrite\Utopia\Response\Model;
use Appwrite\Utopia\Response;
class ErrorDev extends Error
{
/**
* @var bool
*/
protected $public = false;
public function __construct()
{
parent::__construct();
$this
->addRule('file', [
'type' => self::TYPE_STRING,
'description' => 'File path.',
'default' => '',
'example' => '/usr/code/vendor/utopia-php/framework/src/App.php',
])
->addRule('line', [
'type' => self::TYPE_INTEGER,
'description' => 'Line number.',
'default' => 0,
'example' => 209,
])
->addRule('trace', [
'type' => self::TYPE_STRING,
'description' => 'Error trace.',
'default' => [],
'example' => '',
'array' => true,
])
;
}
/**
* Get Type
*
* @return string
*/
public function getType():string
{
return Response::MODEL_ERROR_DEV;
}
}