<?php namespace WPForms; use WPForms\Admin\Tools\Views\Import; /** * Class API. * * @since 1.8.6 */ class API { /** * Registry. * Contains name of the class and method to be called. * For non-static methods, should contain the id to operate via wpforms->get( 'class' ). * * @todo Add non-static methods processing. * * @since 1.8.6 * * @var array[] */ private $registry = [ 'import_forms' => [ 'class' => Import::class, 'method' => 'import_forms', ], ]; /** * Magic method to call a method from registry. * * @since 1.8.6 * * @param string $name Method name. * @param array $args Arguments. * * @return mixed|null */ public function __call( string $name, array $args ) { $callback = $this->registry[ $name ] ?? null; if ( $callback === null ) { return null; } return call_user_func( [ $callback['class'], $callback['method'] ], ...$args ); } }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
Access | Folder | 0755 |
|
|
Admin | Folder | 0755 |
|
|
Db | Folder | 0755 |
|
|
Emails | Folder | 0755 |
|
|
Forms | Folder | 0755 |
|
|
Frontend | Folder | 0755 |
|
|
Helpers | Folder | 0755 |
|
|
Integrations | Folder | 0755 |
|
|
Lite | Folder | 0755 |
|
|
Logger | Folder | 0755 |
|
|
Migrations | Folder | 0755 |
|
|
Providers | Folder | 0755 |
|
|
Requirements | Folder | 0755 |
|
|
SmartTags | Folder | 0755 |
|
|
Tasks | Folder | 0755 |
|
|
API.php | File | 923 B | 0644 |
|
ErrorHandler.php | File | 10.94 KB | 0644 |
|
Loader.php | File | 14.67 KB | 0644 |
|
WPForms.php | File | 13.2 KB | 0644 |
|