getMethodName() public method

Retrieves the method name.
public getMethodName ( ) : string
return string
Ejemplo n.º 1
0
 /**
  * Creates a new Descriptor from the given Reflector.
  *
  * @param MethodTag $data
  *
  * @return MethodDescriptor
  */
 public function create($data)
 {
     $descriptor = new MethodDescriptor($data->getName());
     $descriptor->setDescription($data->getDescription());
     $descriptor->setMethodName($data->getMethodName());
     $response = new ReturnDescriptor('return');
     $response->setTypes($this->builder->buildDescriptor(new Collection($data->getTypes())));
     $descriptor->setResponse($response);
     foreach ($data->getArguments() as $argument) {
         $argumentDescriptor = $this->createArgumentDescriptorForMagicMethod($argument);
         $descriptor->getArguments()->set($argumentDescriptor->getName(), $argumentDescriptor);
     }
     return $descriptor;
 }
Ejemplo n.º 2
0
 /**
  * Creates a new Descriptor from the given Reflector.
  *
  * @param MethodTag $data
  *
  * @return MethodDescriptor
  */
 public function create($data)
 {
     $descriptor = new MethodDescriptor($data->getName());
     $descriptor->setDescription($data->getDescription());
     $descriptor->setMethodName($data->getMethodName());
     $response = new ReturnDescriptor('return');
     $response->setTypes($data->getTypes());
     $descriptor->setResponse($response);
     foreach ($data->getArguments() as $argument) {
         if (count($argument) > 1) {
             list($argumentType, $argumentName) = $argument;
         } else {
             $argumentName = current($argument);
             $argumentType = 'mixed';
         }
         $argumentDescriptor = new ArgumentDescriptor();
         $argumentDescriptor->setTypes(array($argumentType));
         $argumentDescriptor->setName($argumentName);
         $descriptor->getArguments()->set($argumentName, $argumentDescriptor);
     }
     return $descriptor;
 }