Hi!

I think the proposal in the Wiki is just fine - enums should be simple, restricted to enumeration and be just a syntax sugar for the series of constants/defines.

public function setLogLevel (Levels $logLevel)
{
    $this->logLevel = $logLevel;
}

This I think is an overkill. Think about how you would read the log level from config file, for example.

More complex cases - like verification, sets of constants, complex behavior, etc. - can be done via plain old classes.
--
Stanislav Malyshev, Software Architect
SugarCRM: http://www.sugarcrm.com/
(408)454-6900 ext. 227

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to