1. Go to this page and download the library: Download tourane/codetags 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/ */
tourane / codetags example snippets
use Tourane\Codetags\TagManager;
$default = TagManager::instance();
// ...
if ($default->isActive('new-version')) {
// do somethings
}
if ($default->isActive('mongodb', 'couchdb')) {
// at least one of 'mongodb' and 'couchdb' is available
}
if ($default->isActive(['foo', 'bar'])) {
// both 'foo' and 'bar' are available
}
use Tourane\Codetags\TagManager;
$default = TagManager::instance();
$oldFlow = TagManager::getInstance("oldflow");
$newFlow = TagManager::getInstance("current", array(
"namespace" => "newflow"
));
if ($default->isActive("new-version")) {
echo sprintf("%s is activated\n", "new-version");
}
if ($default->isActive(["foo", "bar"])) {
echo sprintf("Both %s are activated\n", implode(",", ["foo", "bar"]));
}
if ($newFlow->isActive("couchdb", "mongodb")) {
echo sprintf("One of %s is activated\n", implode(",", ["couchdb", "mongodb"]));
}
if ($newFlow->isActive(["couchdb", "mongodb"])) {
echo sprintf("All of %s are activated\n", implode(",", ["couchdb", "mongodb"]));
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.