Inpsyde\MultilingualPress\Core\ImmutablePluginProperties::__construct PHP Method

__construct() public method

Constructor. Sets up the properties.
Since: 3.0.0
public __construct ( string $plugin_file_path )
$plugin_file_path string Main plugin file path.
    public function __construct($plugin_file_path)
    {
        if (!isset($this->properties)) {
            $file_data = ['plugin_base_name' => plugin_basename($plugin_file_path), 'plugin_dir_path' => plugin_dir_path($plugin_file_path), 'plugin_dir_url' => plugins_url('/', $plugin_file_path), 'plugin_file_path' => (string) $plugin_file_path];
            $header_data = get_file_data($plugin_file_path, ['plugin_name' => 'Plugin Name', 'plugin_website' => 'Plugin URI', 'version' => 'Version', 'text_domain' => 'Text Domain', 'text_domain_path' => 'Domain Path']);
            $this->properties = array_merge($file_data, $header_data);
        }
    }