PHP code example of faxity / di-sorcery

1. Go to this page and download the library: Download faxity/di-sorcery 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/ */

    

faxity / di-sorcery example snippets


// Replace or comment out the current DIFactory config
// Add all framework services to $di
//$di = new Anax\DI\DIFactoryConfig();
//$di->loadServices(ANAX_INSTALL_PATH . "/config/di");

// Add all framework services to $di
$di = new \Faxity\DI\DISorcery(ANAX_INSTALL_PATH, ANAX_INSTALL_PATH . "/vendor");
$di->initialize("config/sorcery.php");



/**
 * Configuration file for Anax sources, all relative paths are vendor scoped.
 */
return [
    "anax/cache",
    "anax/configure",
    "anax/content",
    "anax/database",
    "anax/database-query-builder",
    "anax/page",
    "anax/request",
    "anax/response",
    "anax/router",
    "anax/session",
    "anax/textfilter",
    "anax/url",
    "anax/view",
];