2024-12-15 04:20:44 +07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
namespace ${REPO_OWNER}\${REPO_NAME}\models\interfaces;
|
|
|
|
|
|
|
|
// Library для ArangoDB
|
|
|
|
use ArangoDBClient\Document as _document;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Document
|
|
|
|
*
|
|
|
|
* Interface for implementing a document instance from ArangoDB
|
|
|
|
*
|
2024-12-15 22:16:01 +07:00
|
|
|
* @param _document $$document An instance of the ArangoDB document from ArangoDB (protected readonly)
|
2024-12-15 04:20:44 +07:00
|
|
|
*
|
|
|
|
* @package ${REPO_OWNER}\${REPO_NAME}\models\interfaces
|
|
|
|
*
|
|
|
|
* @license http://www.wtfpl.net/ Do What The Fuck You Want To Public License
|
|
|
|
* @author ${REPO_OWNER} <mail@domain.zone>
|
|
|
|
*/
|
|
|
|
interface document
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Write
|
|
|
|
*
|
|
|
|
* Write a property into an instance of the ArangoDB document
|
|
|
|
*
|
2024-12-15 22:16:01 +07:00
|
|
|
* @param string $$name Name of the property
|
|
|
|
* @param mixed $$value Content of the property
|
2024-12-15 04:20:44 +07:00
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
2024-12-15 22:16:01 +07:00
|
|
|
public function __set(string $$name, mixed $$value = null): void;
|
2024-12-15 04:20:44 +07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Read
|
|
|
|
*
|
|
|
|
* Read a property from an instance of the ArangoDB docuemnt
|
|
|
|
*
|
2024-12-15 22:16:01 +07:00
|
|
|
* @param string $$name Name of the property
|
2024-12-15 04:20:44 +07:00
|
|
|
*
|
|
|
|
* @return mixed Content of the property
|
|
|
|
*/
|
2024-12-15 22:16:01 +07:00
|
|
|
public function __get(string $$name): mixed;
|
2024-12-15 04:20:44 +07:00
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Delete
|
|
|
|
*
|
|
|
|
* Deinitialize the property in an instance of the ArangoDB document
|
|
|
|
*
|
2024-12-15 22:16:01 +07:00
|
|
|
* @param string $$name Name of the property
|
2024-12-15 04:20:44 +07:00
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
2024-12-15 22:16:01 +07:00
|
|
|
public function __unset(string $$name): void;
|
2024-12-15 04:20:44 +07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Check of initialization
|
|
|
|
*
|
|
|
|
* Check of initialization of the property into an instance of the ArangoDB document
|
|
|
|
*
|
2024-12-15 22:16:01 +07:00
|
|
|
* @param string $$name Name of the property
|
2024-12-15 04:20:44 +07:00
|
|
|
*
|
|
|
|
* @return bool The property is initialized?
|
|
|
|
*/
|
2024-12-15 22:16:01 +07:00
|
|
|
public function __isset(string $$name): bool;
|
2024-12-15 04:20:44 +07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Execute a method
|
|
|
|
*
|
|
|
|
* Execute a method from an instance of the ArangoDB document
|
|
|
|
*
|
2024-12-15 22:16:01 +07:00
|
|
|
* @param string $$name Name of the method
|
|
|
|
* @param array $$arguments Arguments for the method
|
2024-12-15 04:20:44 +07:00
|
|
|
*
|
|
|
|
* @return mixed Result of execution of the method
|
|
|
|
*/
|
2024-12-15 22:16:01 +07:00
|
|
|
public function __call(string $$name, array $$arguments = []): mixed;
|
2024-12-15 04:20:44 +07:00
|
|
|
}
|