public function generateVariableName($value)
    {
        $occurence = 0;

        if (is_object($value) === true) {
            $counter = $this->getObjectCount();
            $className = get_class($value);

            if (isset($counter[$className]) === false) {
                $occurence = 0;
                $counter[$className] = $occurence;
            } else {
                $occurence = $counter[$className];
            }

            $counter[$className] += 1;
            $this->setObjectCount($counter);
        } else {
            if (is_null($value) === true) {
                $type = 'null';
            } else {
                $type = gettype($value);
            }

            $counter = $this->getDatatypeCount();
            $occurence = $counter[$type];
            $counter[$type] += 1;

            $this->setDatatypeCount($counter);
        }

        return PhpMarshallingUtils::variableName($value, $occurence);
    }
public function generateVariableName($value)
    {
        $occurence = 0;

        if (is_object($value) === true) {
            $counter = $this->getObjectCount();
            $className = get_class($value);

            if (isset($counter[$className]) === false) {
                $occurence = 0;
                $counter[$className] = $occurence;
            } else {
                $occurence = $counter[$className];
            }

            $counter[$className] += 1;
            $this->setObjectCount($counter);
        } else {
            if (is_null($value) === true) {
                $type = 'null';
            } else {
                $type = gettype($value);
            }

            $counter = $this->getDatatypeCount();
            $occurence = $counter[$type];
            $counter[$type] += 1;

            $this->setDatatypeCount($counter);
        }

        return PhpMarshallingUtils::variableName($value, $occurence);
    }
public function generateVariableName ( $ value ) { $ occurence = 0 ; if ( is_object ( $ value ) === true ) { $ counter = $ this -> getObjectCount ( ) ; $ className = get_class ( $ value ) ; if ( isset ( $ counter [ $ className ] ) === false ) { $ occurence = 0 ; $ counter [ $ className ] = $ occurence ; } else { $ occurence = $ counter [ $ className ] ; } $ counter [ $ className ] += 1 ; $ this -> setObjectCount ( $ counter ) ; } else { if ( is_null ( $ value ) === true ) { $ type = 'null' ; } else { $ type = gettype ( $ value ) ; } $ counter = $ this -> getDatatypeCount ( ) ; $ occurence = $ counter [ $ type ] ; $ counter [ $ type ] += 1 ; $ this -> setDatatypeCount ( $ counter ) ; } return PhpMarshallingUtils :: variableName ( $ value , $ occurence ) ; }
Generates a suitable variable name to be used for a given value.

@param mixed $value A value.
@return string A variable name without the leading dollar sign ('$').
Generates a suitable variable name to be used for a given value .