📄️ About class functions
This section describes the built-in 4D class functions as well as the associated constructor commands. 4D class functions and properties are available through class instance objects.
📄️ Blob
The Blob class lets you create and manipulate blob objects (4D.Blob).
📄️ Class
When a user class is defined in the project, it is loaded in the 4D language environment. A class is an object itself, of "Class" class, which has properties and a function.
📄️ Collection
The Collection class manages Collection type variables.
📄️ CryptoKey
The CryptoKey class in the 4D language encapsulates an asymmetric encryption key pair.
📄️ DataClass
A DataClass provides an object interface to a database table. All dataclasses in a 4D application are available as a property of the ds datastore.
📄️ DataStore
A Datastore is the interface object provided by ORDA to reference and access a database. Datastore objects are returned by the following commands:
Creating, sending or receiving emails in 4D is done by handling an Email object.
📄️ Entity
An entity is an instance of a Dataclass, like a record of the table matching the dataclass in its associated datastore. It contains the same attributes as the dataclass as well as the data values and specific properties and functions.
📄️ EntitySelection
An entity selection is an object containing one or more reference(s) to entities belonging to the same Dataclass. An entity selection can contain 0, 1 or X entities from the dataclass -- where X can represent the total number of entities contained in the dataclass.
📄️ File
File objects are created with the File command. They contain references to disk files that may or may not actually exist on disk. For example, when you execute the File command to create a new file, a valid File object is created but nothing is actually stored on disk until you call the file.create( ) function.
📄️ FileHandle
The FileHandle class has functions that allow you to sequentially read from or append contents to an opened File object. A file handle can access any part of a document.
📄️ Folder
Folder objects are created with the Folder command. They contain references to folders that may or may not actually exist on disk. For example, when you execute the Folder command to create a new folder, a valid Folder object is created but nothing is actually stored on disk until you call the folder.create() function.
📄️ Function
A 4D.Function object contains a piece of code that can be executed from an object, either using the () operator, or using the apply() and call() functions. 4D proposes three kinds of Function objects:
📄️ HTTPAgent
The HTTPAgent class allows you to handle HTTPAgent objects that can be used to manage the persistence and reuse of connections to servers using the HTTPRequest class.
📄️ HTTPRequest
The HTTPRequest class allows you to handle HTTPRequest objects that can be used to configure and send requests to an HTTP server, as well as to process the HTTP server responses.
📄️ IMAPTransporter
The IMAPTransporter class allows you to retrieve messages from a IMAP email server.
📄️ MailAttachment
Attachment objects allow referencing files within a Email object. Attachment objects are created using the MAIL New attachment command.
📄️ OutgoingMessage
The 4D.OutgoingMessage class allows you to build messages to be returned by your application functions in response to REST requests. If the response is of type 4D.OutgoingMessage, the REST server does not return an object but the object instance of the OutgoingMessage class.
📄️ POP3Transporter
The POP3Transporter class allows you to retrieve messages from a POP3 email server.
📄️ Session
Session objects are returned by the Session command. These objects provide the developer with an interface allowing to manage the current user session and execute actions such as store contextual data, share information between session processes, launch session-related preemptive processes, or (web only) manage privileges.
📄️ Signal
Signals are tools provided by the 4D language to manage interactions and avoid conflicts between processes in a multiprocess application. Signals allow you to make sure one or more process(es) will wait for a specific task to be completed before continuing execution. Any process can wait and/or release a signal.
📄️ SMTPTransporter
The SMTPTransporter class allows you to configure SMTP connections and send emails through SMTP transporter objects.
📄️ SystemWorker
System workers allow the 4D code to call any external process (a shell command, PHP, etc.) on the same machine. System workers are called asynchronously. By using callbacks, 4D makes it possible to communicate both ways.
📄️ WebForm
The WebForm class contains functions and properties allowing to handle your Qodly webform components. This class is detailed in the Qodly documentation.
📄️ WebFormItem
4D.WebFormItem objects are properties of the 4D.WebForm object returned by the Web Form command.
📄️ WebServer
The WebServer class API allows you to start and monitor a web server for the main (host) application as well as each hosted component (see the Web Server object overview). This class is available from the 4D class store.
📄️ WebSocket
The WebSocket class allows you to open a WebSocket client connection with a server, send and receive data, and close the connection.
📄️ WebSocketConnection
The WebSocketConnection class API allows you to handle WebSocket connections, once established using the WebSocketServer class.
📄️ WebSocketServer
The WebSocketServer class allows you to create and configure a WebSocket server in 4D. Once the 4D WebSocket server is active, you can open and use WebSocket connections between 4D and clients using the WebSocketConnection class.
📄️ ZIPArchive
A 4D ZIP archive is a File or Folder object containing one or more files or folders, which are compressed to be smaller than their original size. These archives are created with a ".zip" extension and can be used to save disk space or transfer files via mediums which may have size limitations (e.g., email or network).
📄️ ZIPFile
The following properties and functions from the File class are available to ZIPFile objects:
📄️ ZIPFolder
The following properties and functions from the Folder class are available to ZIPFolder objects: