use, instanceof and constants

Hi there who can I do something like this in Volt

use \NS\MyClass;

if ($someVar instanceof MyClass)

{{ getElement(MyClass::MY_ELEMENT) }}

with that three sentences I get error

edited Nov '15

Accessing static objects from volt is not supported, you'll have to create an instantiated helper service for it.

I think you can also write plain PHP code in volt with the standard <?php ... ?> tags.

$someVar = 'foo bar';

{{ someVar }}

Or just restructure you logic and handle it in the Controller.