PHP code example of nonagod / user-actions

1. Go to this page and download the library: Download nonagod/user-actions 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/ */

    

nonagod / user-actions example snippets


use \Nonagod\UserActions\Manager;
global $UAManager;
$UAManager = new Manager( $_SERVER['DOCUMENT_ROOT'] . '/examples/_resources/UAM');


/**
 * @var Nonagod\UserActions\Manager $this
 */

$this->succeed("Выполнено");
$this->failed("ERROR", "Ошибка");


// ... some code
global $UAManager
$UAManager->defineStartOfContentPart('<part_name>');
// требуемый кусок страницы
$UAManager->defineEndOfContentPart('<part_name>');
// ... more code

/*for( $i = 0; $i < ob_get_level()+1; $i++ ) {
    $trashed_content = ob_get_clean();
    unset($trashed_content);
}*/
while( ob_get_length( )) {
    $trashed_content = ob_get_clean();
    unset($trashed_content);
}