Jump to content

Help using one method within another...


cgm225

Recommended Posts

I am creating a new method in which I pass a $registryItems variable that is an array, all as follow

 

public function setRegistryArray($registryItems) {
    //$registryItems is an array()
}

 

Within that method, I want to use the following existing method so I can add the $registryItems array values to the registry:

    //Sets registry variable
    public function set($label, $object) {
        $this->store[$label] = $object;
    }

 

However, I am uncertain how to do this.  Thank you in advance!

Link to comment
https://forums.phpfreaks.com/topic/106950-help-using-one-method-within-another/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.