PHP code example of pixelplugin / wp-container-api
1. Go to this page and download the library: Download pixelplugin/wp-container-api library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
pixelplugin / wp-container-api example snippets
$value = wp_container_get(ClassName::class);
if (wp_container_has(ClassName::class)) {
// ClassName exists in the container.
}