get_class

Summary

Returns the class of the target.

Usage

$input|get_class( test )

Parameters

NameTypeDescriptionRequired
test any Variable to check. Only if input is omitted.

Returns

String or false.

Description

This operator simply checks and returns the class of a target variable. The operator returns the PHP classname as a string. If both input and parameter are supplied, it is the parameter that will be evaluated. If the data to be evaluated is not an object then the operator will return false. This function is a debug function, not meant to be used in template to use for any logic.

Examples

Example 1

{let my_variable="Test"}

{get_class( $my_variable )}

{/let}

returns false.

Example 2

{get_class( $node )}

returns the string "ezcontentobjecttreenode" as long as $node is an actual node.

Comments

log in or create a user account to comment.

Contents

Reference

Database diagram
Template operators
    PDF
    Arrays
    Data extraction
    Formatting
    Images
    Logic
    Mathematics
    Miscellaneous
    Strings
    URLs
    Variables
       float
       get_class
       get_type
       count
       int
       is_array
       is_boolean
       is_class
       is_float
       is_integer
       is_null
       is_numeric
       is_object
       is_set
       is_string
       is_unset
Template functions
Data fetching
Modules
XML tags


Created

05/02/2004
1:29:54 pm
by Balazs Halasy

Last updated

13/07/2004
9:26:04 am
by Derick Rethans

Authors

Balazs Halasy
Derick Rethans



This page is part of the Exponential documentation. The documentation is available under the GNU Free Documentation License. All contributions will be released under the terms of this license.