GetMetadataClasses

Troy Davisson edited this page Mar 5, 2016 · 3 revisions

Note: This page documents capabilities available in the older 1.x version. Please see this repository's README file for the new 2.x version documentation.

GetMetadataClasses

GetMetadataClasses ( string $resource )

Gets information about the available Classes in the chosen Resource

Parameters

$resource - RETS Resource

Return Value

Array

Each array item represents a single Class. Returns FALSE if request for information failed.

Usage Examples
<?php
$classes = $rets->GetMetadataClasses("Property");
foreach ($classes as $class) {
        echo "+ Class {$class['ClassName']} described as " . $class['Description'] . "\n";
}
+ Class COM described as "Commercial Property"
+ Class RES described as "Single Family Residential"
<?php
$resources = $rets->GetMetadataResources();
foreach ($resources as $resource) {
        echo "+ Resource {$resource['ResourceID']}\n";
        $classes = $rets->GetMetadataClasses($resource['ResourceID']);
        foreach ($classes as $class) {
                echo "   + Class {$class['ClassName']} described as " . $class['Description'] . "\n";
        }
}
+ Resource Property
   + Class COM described as "Commercial Property"
   + Class RES described as "Single Family Residential"
+ Resource Agent
   + Class Agent described as "List of agent records"
+ Resource Office
   + Class Office described as "List of office records"
Related To

GetMetadataTypes, GetMetadataResources, GetMetadataTable