![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/dceprojects.corals.io/vendor/nesk/rialto/src/node-process/Data/ |
'use strict'; class ResourceIdentity { /** * Constructor. * * @param {string} uniqueIdentifier * @param {string|null} className */ constructor(uniqueIdentifier, className = null) { this.resource = {uniqueIdentifier, className}; } /** * Return the unique identifier of the resource. * * @return {string} */ uniqueIdentifier() { return this.resource.uniqueIdentifier; } /** * Return the class name of the resource. * * @return {string|null} */ className() { return this.resource.className; } /** * Unserialize a resource identity. * * @param {Object} identity * @return {ResourceIdentity} */ static unserialize(identity) { return new ResourceIdentity(identity.id, identity.class_name); } /** * Serialize the resource identity. * * @return {Object} */ serialize() { return { __rialto_resource__: true, id: this.uniqueIdentifier(), class_name: this.className(), }; } } module.exports = ResourceIdentity;