</multiselect>
    */
    $field_name = "languages";
    echo "Testing {$field_name}", BR;
    if ($m->hasDynamicField($field_name)) {
        $multiselect = $m->getDynamicField($field_name);
        u\DebugUtility::dump($multiselect->toStdClass());
        $new_values = array("Japanese", "English");
        if ($ms->hasDynamicMetadataFieldDefinition($field_name)) {
            $dmfd = $ms->getDynamicMetadataFieldDefinition($field_name);
            $valid = true;
            foreach ($new_values as $new_value) {
                if (!$dmfd->hasPossibleValue($new_value)) {
                    $valid = false;
                    break;
                }
            }
            if ($valid) {
                $m->setDynamicFieldValues($field_name, $new_values);
            }
        }
    }
    u\DebugUtility::dump($m->toStdClass());
    // commit all changes
    $block->edit();
    echo u\ReflectionUtility::getClassDocumentation("cascade_ws_property\\Metadata");
} catch (\Exception $e) {
    echo S_PRE . $e . E_PRE;
} catch (\Error $er) {
    echo S_PRE . $er . E_PRE;
}
        echo "Tis true", BR;
    } else {
        echo "Tis false", BR;
    }
    if (u\StringUtility::stringToBool(0)) {
        echo "Tis true", BR;
    } else {
        echo "Tis false", BR;
    }
    if (u\StringUtility::stringToBool("")) {
        echo "Tis true", BR;
    } else {
        echo "Tis false", BR;
    }
    echo u\StringUtility::boolToString(true), BR;
    echo u\StringUtility::startsWith("Hello", "He") ? "yes" : "no", BR;
    echo u\StringUtility::startsWith("Hello", "e") ? "yes" : "no", BR;
    echo u\StringUtility::removeSiteNameFromPath("site://cascade-admin/web-services/api/utility-classes/debug-utility"), BR;
    echo u\StringUtility::getParentPathFromPath("/web-services/api/utility-classes/debug-utility"), BR;
    echo u\StringUtility::getNameFromPath("/web-services/api/utility-classes/debug-utility"), BR;
    echo u\StringUtility::getMethodName("structuredData"), BR;
    u\DebugUtility::dump(u\StringUtility::getExplodedStringArray(";", "this;0;that;3;these"));
    echo u\StringUtility::getFullyQualifiedIdentifierWithoutPositions("this;0;that;3;these"), BR;
    echo u\StringUtility::endsWith("Hello", "lo") ? "yes" : "no", BR;
    echo u\StringUtility::endsWith("Hello", "l") ? "yes" : "no", BR;
    echo u\ReflectionUtility::getClassDocumentation("cascade_ws_utility\\StringUtility", true);
} catch (\Exception $e) {
    echo S_PRE . $e . E_PRE;
} catch (\Error $er) {
    echo S_PRE . $er . E_PRE;
}
<?php

require_once 'auth_tutorial7.php';
use cascade_ws_AOHS as aohs;
use cascade_ws_constants as c;
use cascade_ws_asset as a;
use cascade_ws_property as p;
use cascade_ws_utility as u;
use cascade_ws_exception as e;
try {
    // test static method
    $id = "06e401898b7ffe83765c5582e367462b";
    $block = a\Block::getBlock($service, $id);
    //->dump( true ); // no type info supplied
    echo a\Block::getBlockType($service, $id), BR;
    // get methods
    echo "Created by: ", $block->getCreatedBy(), BR, "Created on: ", $block->getCreatedDate(), BR, "Expiration folder ID: ", $block->getExpirationFolderId(), BR, "Expiration folder path: ", $block->getExpirationFolderPath(), BR, "Expiration folder recycled: ", u\StringUtility::boolToString($block->getExpirationFolderRecycled()), BR, "Last modified by: ", $block->getLastModifiedBy(), BR, "Last modified date: ", $block->getLastModifiedDate(), BR, "Metadata set ID: ", $block->getMetadataSetId(), BR, "Metadata set path: ", $block->getMetadataSetPath(), BR;
    u\DebugUtility::dump($block->getDynamicFields());
    u\DebugUtility::dump($block->getMetadataStdClass());
    echo u\ReflectionUtility::getClassDocumentation("cascade_ws_asset\\Block");
} catch (\Exception $e) {
    echo S_PRE . $e . E_PRE;
} catch (\Error $er) {
    echo S_PRE . $er . E_PRE;
}
<?php

/*
This program shows how to use the newly added cascade_ws_utility\ReflectionUtility class.
To run this example, upgrade the library to make the class available to MAMP.

After running this example, find out more about the class by checking out 
the available methods.
*/
require_once 'auth_tutorial.php';
use cascade_ws_AOHS as aohs;
use cascade_ws_constants as c;
use cascade_ws_asset as a;
use cascade_ws_property as p;
use cascade_ws_utility as u;
use cascade_ws_exception as e;
try {
    //u\ReflectionUtility::showMethodSignatures(
    //"cascade_ws_asset\Page" );
    u\ReflectionUtility::showMethodExample("cascade_ws_utility\\ReflectionUtility", "showMethodSignatures");
} catch (\Exception $e) {
    echo S_PRE . $e . E_PRE;
}
<?php

require_once 'cascade_ws_ns/auth_chanw.php';
use cascade_ws_AOHS as aohs;
use cascade_ws_constants as c;
use cascade_ws_asset as a;
use cascade_ws_property as p;
use cascade_ws_utility as u;
use cascade_ws_exception as e;
try {
    $func_names = array("strpos", "str_replace", "strlen", "strtolower");
    foreach ($func_names as $func_name) {
        u\ReflectionUtility::showFunctionSignature($func_name, true);
    }
    /* outputs:
    
    strpos( $haystack,  $needle,  $offset )
    <hr class='thin width100 text_lightgray bg_lightgray' />
    str_replace( $search,  $replace,  $subject,  $replace_count )
    <hr class='thin width100 text_lightgray bg_lightgray' />
    strlen( $str )
    <hr class='thin width100 text_lightgray bg_lightgray' />
    strtolower( $str )
    <hr class='thin width100 text_lightgray bg_lightgray' />
    */
} catch (\Exception $e) {
    echo S_PRE . $e . E_PRE;
}
            if ($mode != 'all') {
                break;
            }
        case 'move':
            if ($tb->isInContainer($f)) {
                $new_f = $cascade->getAsset(a\Folder::TYPE, '980d67ab8b7f0856015997e4b8d84c5d');
                $tb->move($new_f);
            }
            if ($mode != 'all') {
                break;
            }
        case 'rename':
            $tb->rename("old-text")->move($cascade->getAsset(a\Folder::TYPE, '980d67e28b7f0856015997e42f97abb2'));
            if ($mode != 'all') {
                break;
            }
        case 'set':
            $text = "Text for the text block.";
            $tb->setText($text)->edit();
            $tb->setExpirationFolder($cascade->getAsset(a\Folder::TYPE, "2401bc368b7ffe834c5fe91e0027a274"))->edit()->dump();
            $tb->setMetadataSet($cascade->getAsset(a\MetadataSet::TYPE, "cc1e51068b7ffe8364375ac78eca378c"))->dump();
            if ($mode != 'all') {
                break;
            }
    }
    u\ReflectionUtility::showMethodSignatures("cascade_ws_asset\\TextBlock");
} catch (\Exception $e) {
    echo S_PRE . $e . E_PRE;
} catch (\Error $er) {
    echo S_PRE . $er . E_PRE;
}
try {
    // create an identifier stdClass object
    $id_std = $service->createId(a\Folder::TYPE, "cc1e51808b7ffe8364375ac78ba27f05");
    u\DebugUtility::dump($id_std);
    // create a Child object
    $id_child = new p\Child($id_std);
    u\DebugUtility::dump($id_child);
    u\DebugUtility::dump($id_child->toStdClass());
    // read the asset
    $folder = $id_child->getAsset($service);
    // list the content of the folder
    $children = $folder->getChildren();
    u\DebugUtility::dump($children);
    // display each child
    foreach ($children as $child) {
        $child->display();
        echo $child->getId(), BR;
        echo $child->getType(), BR;
        echo $child->getPathPath(), BR;
        echo $child->getPathSiteId(), BR;
        echo u\StringUtility::getCoalescedString($child->getPathSiteName()), BR;
        echo u\StringUtility::boolToString($child->getRecycled()), BR;
        u\DebugUtility::dump($child->getPath()->toStdClass());
    }
    u\ReflectionUtility::showMethodSignatures("cascade_ws_property\\Identifier");
    u\ReflectionUtility::showMethodSignatures("cascade_ws_property\\Path");
} catch (\Exception $e) {
    echo S_PRE . $e . E_PRE;
} catch (\Error $er) {
    echo S_PRE . $er . E_PRE;
}
                break;
            }
        case 'plugin':
            $temp_plugins = $af->getPluginStd();
            $af->addPlugin(a\AssetFactory::CREATE_RESIZED_IMAGES_PLUGIN)->addPlugin(a\AssetFactory::FILE_LIMIT_PLUGIN)->dump(true);
            $af->setPluginParameterValue(a\AssetFactory::CREATE_RESIZED_IMAGES_PLUGIN, a\AssetFactory::CREATE_RESIZED_PARAM_WIDTH, "foo")->setPluginParameterValue(a\AssetFactory::FILE_LIMIT_PLUGIN, a\AssetFactory::FILE_LIMIT_PARAM_SIZE, "13")->dump(true);
            $af->removePlugin(a\AssetFactory::CREATE_RESIZED_IMAGES_PLUGIN)->dump(true);
            $af->addPlugin(a\AssetFactory::IMAGE_RESIZER_PLUGIN)->setPluginParameterValue(a\AssetFactory::IMAGE_RESIZER_PLUGIN, a\AssetFactory::IMAGE_RESIZER_PARAM_HEIGHT, "45")->setPluginParameterValue(a\AssetFactory::IMAGE_RESIZER_PLUGIN, a\AssetFactory::IMAGE_RESIZER_PARAM_WIDTH, "80")->dump(true);
            $af->removePlugin(a\AssetFactory::PAGE_NAME_CHARS_LIMIT_PLUGIN)->dump(true);
            $af->addPlugin(a\AssetFactory::STRUCTURED_DATA_FIELD_TO_SYSTEM_NAME_PLUGIN)->setPluginParameterValue(a\AssetFactory::STRUCTURED_DATA_FIELD_TO_SYSTEM_NAME_PLUGIN, a\AssetFactory::SD_FIELD_TO_SYSTEM_NAME_PARAM_FIELD_ID, "those")->dump(true);
            $af->removePluginParameter(a\AssetFactory::STRUCTURED_DATA_FIELD_TO_SYSTEM_NAME_PLUGIN, a\AssetFactory::SD_FIELD_TO_SYSTEM_NAME_PARAM_FIELD_ID)->dump(true);
            // undo everything
            $af->setPlugins($temp_plugins)->dump(true);
            if ($mode != 'all') {
                break;
            }
        case 'raw':
            $af = $service->retrieve($service->createId(c\T::ASSETFACTORY, $id), c\P::ASSETFACTORY);
            echo S_PRE;
            u\DebugUtility::dump($af);
            echo E_PRE;
            if ($mode != 'all') {
                break;
            }
    }
    echo u\ReflectionUtility::getClassDocumentation("cascade_ws_asset\\AssetFactory");
} catch (\Exception $e) {
    echo S_PRE . $e . E_PRE;
} catch (\Error $er) {
    echo S_PRE . $er . E_PRE;
}
            $rmsc = $cascade->getAsset(a\MetadataSetContainer::TYPE, $id);
            u\DebugUtility::dump($rmsc->getParentContainer());
            // NULL
            // metadata set container
            $id = 'e10375238b7ffe8364375ac7a41ad6e3';
            $msc = $cascade->getAsset(a\MetadataSetContainer::TYPE, $id);
            $msc->getParentContainer()->display();
            // folder
            $id = '38906a9f8b7ffe83164c9314b9bdebfd';
            $f = $cascade->getAsset(a\Folder::TYPE, $id);
            $f->getParentContainer()->display();
            // data definition
            $id = '38a20d858b7ffe83164c931479486e6f';
            $dd = $cascade->getAsset(a\DataDefinition::TYPE, $id);
            $dd->getParentContainer()->display();
            echo $dd->getParentContainerId(), BR, $dd->getParentContainerPath(), BR;
            echo u\StringUtility::boolToString($dd->isDescendantOf($msc)), BR;
            if ($mode != 'all') {
                break;
            }
        case 'raw':
            if ($mode != 'all') {
                break;
            }
    }
    echo u\ReflectionUtility::getClassDocumentation("cascade_ws_asset\\ContainedAsset");
} catch (\Exception $e) {
    echo S_PRE . $e . E_PRE;
} catch (\Error $er) {
    echo S_PRE . $er . E_PRE;
}
               u\DebugUtility::dump(
               	$cascade->searchForAssetName(
               		"a*",
               		c\S::SEARCHPAGES
               	)
               );
               u\DebugUtility::dump(
               	$cascade->searchForAssetContent(
               		"Cascade",
               		c\S::SEARCHPAGES
               	)
               );
               u\DebugUtility::dump(
               	$cascade->searchForAll(
               		"a*",
               		"Cascade",
               		"",
               		c\S::SEARCHPAGES
               	)
               );
            */
            if ($mode != 'all') {
                break;
            }
    }
    u\ReflectionUtility::showMethodSignatures($cascade);
} catch (\Exception $e) {
    echo S_PRE . $e . E_PRE;
} catch (\Error $er) {
    echo S_PRE . $er . E_PRE;
}
<?php

require_once 'auth_tutorial7.php';
use cascade_ws_AOHS as aohs;
use cascade_ws_constants as c;
use cascade_ws_asset as a;
use cascade_ws_property as p;
use cascade_ws_utility as u;
use cascade_ws_exception as e;
try {
    $at = $cascade->getSite("ws-tutorial-wing")->getRootFolderAssetTree();
    echo $at->toListString();
    //echo S_PRE, u\XmlUtility::replaceBrackets( $at->toXml() ), E_PRE;
    echo u\ReflectionUtility::showMethodSignatures("cascade_ws_asset\\AssetTree");
} catch (\Exception $e) {
    echo S_PRE . $e . E_PRE;
} catch (\Error $er) {
    echo S_PRE . $er . E_PRE;
}
<?php

require_once 'cascade_ws_ns/auth_chanw.php';
use cascade_ws_AOHS as aohs;
use cascade_ws_constants as c;
use cascade_ws_asset as a;
use cascade_ws_property as p;
use cascade_ws_utility as u;
use cascade_ws_exception as e;
try {
    u\ReflectionUtility::showMethodSignatures("cascade_ws_asset\\Page");
    /* outputs:
    
    <ul>
    <li>
    <code>public cascade_ws_asset\Page::__construct( $service,  $identifier )</code></li>
    <li>
    <code>public cascade_ws_asset\Page::appendSibling( $identifier )</code></li>
    <li>
    <code>public cascade_ws_asset\Page::createNInstancesForMultipleField( $number,  $identifier )</code></li>
    <li>
    <code>public cascade_ws_asset\Page::displayDataDefinition()</code></li>
    <li>
    <code>public cascade_ws_asset\Page::displayXhtml()</code></li>
    <li>
    <code>public cascade_ws_asset\Page::edit( $wf = NULL,  $wd = NULL,  $new_workflow_name = "",  $comment = "",  $exception = 1 )</code></li>
    <li>
    <code>public cascade_ws_asset\Page::getAssetNodeType( $identifier )</code></li>
    <li>
    <code>public cascade_ws_asset\Page::getBlockFormatMap( $configuration )</code></li>
    <li>
<?php

/* 
This program works for classes that are documented in a certain way. 
See the source of ReflectionUtility for an example.
*/
require_once 'cascade_ws_ns/auth_chanw.php';
use cascade_ws_AOHS as aohs;
use cascade_ws_constants as c;
use cascade_ws_asset as a;
use cascade_ws_property as p;
use cascade_ws_utility as u;
use cascade_ws_exception as e;
try {
    u\ReflectionUtility::showMethodDescription("cascade_ws_AOHS\\AssetOperationHandlerService", "getAudits");
    /* output:
    
    <p>Gets the audits object after the call of readAudits().</p>
    */
    u\ReflectionUtility::showMethodExample("cascade_ws_AOHS\\AssetOperationHandlerService", "getAudits");
    /* outputs:
    
    <pre>u\DebugUtility::dump( $service->getAudits() );</pre>
    */
} catch (\Exception $e) {
    echo S_PRE . $e . E_PRE;
}
<?php

require_once 'auth_tutorial7.php';
use cascade_ws_AOHS as aohs;
use cascade_ws_constants as c;
use cascade_ws_asset as a;
use cascade_ws_property as p;
use cascade_ws_utility as u;
use cascade_ws_exception as e;
try {
    echo u\ReflectionUtility::getClassName($service), BR;
    u\DebugUtility::out(u\ReflectionUtility::getClassName($service));
    //u\DebugUtility::dump( $service );
} catch (\Exception $e) {
    echo S_PRE . $e . E_PRE;
} catch (\Error $er) {
    echo S_PRE . $er . E_PRE;
}
/*
Useful code templates:
    u\ReflectionUtility::showMethodSignatures( 
        "cascade_ws_utility\ReflectionUtility" );
        
    u\ReflectionUtility::showMethodSignature( 
        "cascade_ws_asset\Page", "edit" );
        
    u\ReflectionUtility::showMethodDescription( 
        "cascade_ws_utility\ReflectionUtility", "getMethodInfoByName", true );
        
    u\ReflectionUtility::showMethodExample( 
        "cascade_ws_utility\ReflectionUtility", "getMethodInfoByName", true );
<?php

/*
This program is used to generate the method signatures of a certain class.
To generate the output for PHP 7, the source code must be written in PHP 7,
with param types and return types.
*/
require_once 'auth_tutorial.php';
use cascade_ws_AOHS as aohs;
use cascade_ws_constants as c;
use cascade_ws_asset as a;
use cascade_ws_property as p;
use cascade_ws_utility as u;
use cascade_ws_exception as e;
try {
    u\ReflectionUtility::showMethodSignatures("cascade_ws_utility\\ReflectionUtility");
    /*  outputs (PHP 5):
    
    <ul>
    <li>
    <code>public static cascade_ws_utility\ReflectionUtility::getClassDocumentation( $obj )</code></li>
    <li>
    <code>public static cascade_ws_utility\ReflectionUtility::getClassInfo( $obj,  $r = NULL )</code></li>
    <li>
    <code>public static cascade_ws_utility\ReflectionUtility::getClassName( $obj )</code></li>
    <li>
    <code>public static cascade_ws_utility\ReflectionUtility::getFunctionSignature( $function )</code></li>
    <li>
    <code>public static cascade_ws_utility\ReflectionUtility::getMethod( $obj,  $method_name )</code></li>
    <li>
    <code>public static cascade_ws_utility\ReflectionUtility::getMethodInfo( $method )</code></li>
<?php

require_once 'cascade_ws_ns/auth_chanw.php';
use cascade_ws_AOHS as aohs;
use cascade_ws_constants as c;
use cascade_ws_asset as a;
use cascade_ws_property as p;
use cascade_ws_utility as u;
use cascade_ws_exception as e;
try {
    u\ReflectionUtility::showMethodSignatures("ReflectionParameter");
    /* outputs:
    
    <ul>
    <li>
    <code>public static ReflectionParameter::export( $function,  $parameter,  $return )</code></li>
    <li>
    <code>public ReflectionParameter::__construct( $function,  $parameter )</code></li>
    <li>
    <code>public ReflectionParameter::__toString()</code></li>
    <li>
    <code>public ReflectionParameter::getName()</code></li>
    <li>
    <code>public ReflectionParameter::isPassedByReference()</code></li>
    <li>
    <code>public ReflectionParameter::getDeclaringFunction()</code></li>
    <li>
    <code>public ReflectionParameter::getDeclaringClass()</code></li>
    <li>
    <code>public ReflectionParameter::getClass()</code></li>
    <li>