The REDCap Class Information Module is a custom tool designed to reflect on and display details about available PHP classes within the REDCap environment. It generates a detailed list of methods for the selected class, including their visibility, return types, parameters, and other metadata. The tool provides options to download this information as either an HTML or PDF file for further use.
This module is accessible through a custom link in the REDCap Control Panel, ensuring that only users with administrative privileges can access it.
- Class Selection: Provides a dropdown menu of all available PHP classes for inspection.
- Detailed Method Information:
- Visibility (
public
,protected
, orprivate
). - Static, abstract, and final properties.
- Declaring class.
- Return type.
- Parameter details, including type hints, default values, and variadic or reference status.
- Doc comments (if available).
- Visibility (
- Export Options:
- Download the information as an HTML file.
- Download the information as a PDF file using FPDF.
- Restricted Access: Only administrators can access this page via the REDCap Control Panel.
-
Navigate to the Class Inspector:
- Log in as an administrator and access the Check Classes link in the REDCap Control Panel.
-
Select a Class:
- From the dropdown menu, select the class you want to inspect.
-
View Class Information:
- The page displays all methods in the selected class, including:
- Method name.
- Visibility and properties (e.g., static, abstract).
- Declaring class and return type.
- Detailed parameter information.
- The page displays all methods in the selected class, including:
-
Download the Information:
- Use the provided buttons to download the class information as:
- An HTML file.
- A PDF file.
- Use the provided buttons to download the class information as:
- Restricted Access: Only users with administrative privileges can access the Class Inspector module.
- No External Access: The tool is accessible only from the REDCap Control Panel link, ensuring it is not exposed to unauthorized users.
- Data Sanitization: The module uses
htmlspecialchars
to sanitize all dynamic outputs, protecting against injection attacks.
- PDF Not Generating:
- Ensure the
fpdf.php
file is included in theClassInspectorModule
directory. - Verify that the
fpdf.php
file is accessible and readable by the server.
- Ensure the
This module is released under the MIT License. See the LICENSE file for details.