Namespace and ClassPath rewrites
This commit is contained in:
30
Core/Objects/Search/SearchResult.class.php
Normal file
30
Core/Objects/Search/SearchResult.class.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace Core\Objects\Search;
|
||||
|
||||
use Core\Objects\ApiObject;
|
||||
|
||||
class SearchResult extends ApiObject {
|
||||
|
||||
private string $url;
|
||||
private string $title;
|
||||
private string $text;
|
||||
|
||||
public function __construct(string $url, string $title, string $text) {
|
||||
$this->url = $url;
|
||||
$this->title = $title;
|
||||
$this->text = $text;
|
||||
}
|
||||
|
||||
public function jsonSerialize(): array {
|
||||
return [
|
||||
"url" => $this->url,
|
||||
"title" => $this->title,
|
||||
"text" => $this->text
|
||||
];
|
||||
}
|
||||
|
||||
public function setUrl(string $url) {
|
||||
$this->url = $url;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user