Re: is it possible to determine method that calls other method ?
On 27 mrt, 13:15, Jerry Stuckle <jstuck...@attglobal.net> wrote:
> Pugi! wrote:
> > Is it possible to determine method that calls another method ?
> > for example:
>
> > class A {
> > private function One() {
> > // do something depending on calling method
> > }
>
> > public function Two() {
> > return $this->One();
> > }
>
> > public function Three() {
> > return $this->One();
> > }
> > }
>
> > Apart from including method (__METHOD__) in function call: $this-
> >> One(__METHOD__) ?
>
> > Pugi!
>
> No, but why would you want to? If you want to do something different,
> create a different method.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstuck...@attglobal.net
> ==================
Class that can create, modify, delete, move a file (physical) and its
extensive metadata (database). A validate method for the input (an
array) will be different for each action, but not completely. The
calling method could be the means to distinguish between them.
Pugi!
|