uniter icon indicating copy to clipboard operation
uniter copied to clipboard

Add support for interface

Open Trismegiste opened this issue 10 years ago • 2 comments

I've tried

interface Yopyop {
}

I've got :

PHP Parse error: syntax error, unexpected 'Y' in (program) on line 3

Did I miss something ? :eyeglasses:

Trismegiste avatar Oct 18 '14 11:10 Trismegiste

Hi @Trismegiste,

Thanks for reporting this - unfortunately there's no support for interfaces in Uniter just yet. It's on my roadmap to be implemented at some point soon.

Cheers!

asmblah avatar Oct 18 '14 18:10 asmblah

Hi @Trismegiste,

There is now partial interface support in Uniter - constants defined on the interface are accessible from the interface or from classes that implement it, for example:

<?php

interface Yopyop {
    const a = 4;
}

class Test implements Yopyop {}

print Test::a;

Cheers!

asmblah avatar Mar 24 '15 20:03 asmblah