PHP code example of rasclatt / soundconcepts

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

    

rasclatt / soundconcepts example snippets



use SoundConcepts\Credits\Controller as Credits;
# Asset id for the sample program
$asset_id = 123;
# Credit Quantity
$qty  = 1;
# Description (not SUBDOMAIN);
# Add some credits to an asset id
# The last parameter is for expiration date. See manual for format
$Credits->addCredits($distributor_id, $asset_id, $qty, $description);
# Fetch the user summary
$summary = $Credits->getCreditSummary($distributor_id);
# Output the array
print_r($summary);


class MyObserver extends \SoundConcepts\API\Model
{
  public  function __construct()
  {
      # Set your credentials
      $username = 'myprovidedusername';
      $password = 'myprovidedpassword';
      $subdomain = 'myprovideddomain';
      # Create a parent construct 
      return parent::__construct($username, $password, $subdomain);
  }
}

function start_soundconcepts()
{
  new MyObserver();
}

add_action('init', 'start_soundconcepts');