> -----Original Message-----
> From: Stanislav Malyshev [mailto:[EMAIL PROTECTED]
> 
> I'm not sure I understand - what I'm supposed to do now instead of
> Zend::dump? 

I had in mind using the new Zend_Log class.  First set up a logger:

  $log = new Zend_Log(new Zend_Log_Writer_Debug('php://stdout'));

You only have to set that up once, if you store the $log object
somewhere that is accessible throughout your app.

Then you can dump a variable anytime like this:

  $log->debug( $myObject );

> $registry = Zend_Registry::getInstance();
> $registry['key'] = 'value';
> 
> is better than:
> 
> Zend::regiser("key", "value")

Yes, I agree.  I always have to think for a split-second about which one
sets and which one gets.  :-)  I will be happy to see register() and
registry() become deprecated.

> There should be some shortcuts. E.g. something like
> Zend_Registry::put($key, $value) and Zend_Registry::get($key) so you
> don't have to do getInstance each time.

You don't have to use getInstance() each time.  If you have an object of
type Zend_Registry, just use the array notation.  You are not required
to use the default static instance of the registry.  You can create an
instance of a Zend_Registry object and put it anywhere you want -- even
a global variable:

  // in bootstrap:
  $globalReg = new Zend_Registry();

  // anywhere in application:
  $globalReg['key'] = 'value';

> Also, what would become to Zend::initRegistry?
> 
> Also, if we do loader class, I think it would be a good idea to
> interface with spl_autoload etc.

Yes, Zend_Loader would be a natural place to implement an autoload
callback function.

Regards,
Bill Karwin

Reply via email to