rfc:object-model-improvements
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
rfc:object-model-improvements [2011/03/03 14:08] – Adding error - exception martinscotta | rfc:object-model-improvements [2011/03/03 14:12] – martinscotta | ||
---|---|---|---|
Line 27: | Line 27: | ||
- class / interface | - class / interface | ||
* provide a magic constant with the fully qualified class name | * provide a magic constant with the fully qualified class name | ||
- | <code php> | + | |
- | <?php | + | <?php |
- | namespace Foo { | + | namespace Foo { |
- | class Baz {} | + | class Baz {} |
- | } | + | } |
- | namespace Test { | + | namespace Test { |
- | use \Foo\Baz; | + | use \Foo\Baz; |
- | | + | interface Marker {} |
- | class Bar implements Marker {} | + | class Bar implements Marker {} |
- | + | ||
- | var_dump( Marker:: | + | var_dump( Marker:: |
- | var_dump( Baz::CLASS ); // string " | + | var_dump( Baz::CLASS ); // string " |
- | var_dump( Bar::CLASS ); // string " | + | var_dump( Bar::CLASS ); // string " |
- | } | + | } |
- | </ | + | </ |
- errors into exceptions | - errors into exceptions | ||
- | | + | * Improve PHP Exception class |
- | * Remove errors/ | + | |
- | * Better stacks dump | + | |
- | <code php> | + | <code php> |
- | + | try { | |
- | try { | + | include $file; // as of today we just die here |
- | + | } catch(PHPParseException $e) { | |
- | include $file; // as of today we just die here | + | echo $e-> |
- | + | throw new DomainException($e); | |
- | } catch(PHPParseException $e) { | + | } |
- | | + | </ |
- | | + | |
- | } | + | |
- | </ | ||
===== Changelog ===== | ===== Changelog ===== | ||
rfc/object-model-improvements.txt · Last modified: 2017/09/22 13:28 by 127.0.0.1