Re: namespace issues

From: Date: Fri, 29 Oct 2004 04:45:18 +0000
Subject: Re: namespace issues
References: 1  Groups: php.pecl.dev 
Request: Send a blank email to pecl-dev+get-1555@lists.php.net to get a copy of this message
On Thu, 28 Oct 2004, Todd.Kirby wrote: > I have written a small php extension for php 4.3.x and I've set it up in > an object oriented way with accessors for my object attributes. The > problem I am having is that all my accessors show up in phps global > function list, Is there a way to only define extension functions as > methods of an object > > example: > > $movie = myPhpExtensionCreateMovie(/path/to/movie); > > $movie->getFileName(); > $movie->getAuthor(); > > Obviously I don't want to have getAuthor() be a general php function > since it is only relevant to objects created by my extension. How did you define your functions? If you leave the function_entry in your module_entry blank and only pass the list of methods to the INIT_CLASS_ENTRY() call then they should only be visible as class methods for that class. -Rasmus

« previous php.pecl.dev (#1555) next »