hi,

RE: Matthew Weier O'Phinney

On a Nabble post you refer to a piece of code that enables the passing
of a token:

 class My_XmlRpc_Request extends Zend_XmlRpc_Request_Http
    {

        public function __construct()
        {
            parent::__construct();

            if ($this->getMethod() != 'login') {
                $params = $this->getParams();
                $token  = array_shift($params);
                $this->setParams($params);

                // Verify the token, and then add it to the registry...
                Zend_Registry::set('token', $token);
            }
        }
    }

I am correct in thinking that all service method(s) will stay the
same, i.e. - have no reference to the token?

so like this:

/**
         * Add timesheet hours for a candidate
         *
         * @param array Hours for a working week
         * @return array
         */
        public function addHours($hours) {
                
                $timesheetService = new Service_Timesheet();
                $resp = $timesheetService->addCandidateTimesheetHours($hours);

                return $resp;
        }
        

and NOT like this:

/**
         * Add timesheet hours for a candidate
         *
         * @param string token
         * @param array Hours for a working week
         * @return array
         */
        public function addHours($token, $hours) {
                
                $timesheetService = new Service_Timesheet();
                $resp = $timesheetService->addCandidateTimesheetHours($hours);

                return $resp;
        }


TIA

Daniel.

Reply via email to