Exemplo n.º 1
0
 /**
  * @param InvokableParams $params
  */
 protected function process(InvokableParams $params)
 {
     if (null !== $params->getOption('type')) {
         return;
     }
     if (!array_key_exists($params->getName(), $this->implied_types)) {
         return;
     }
     $params->setOption('type', $this->implied_types[$params->getName()]);
 }
Exemplo n.º 2
0
 /**
  * @param InvokableParams $params
  */
 protected function process(InvokableParams $params)
 {
     $name = $params->getName();
     $name_parts = explode('::', $name, 2);
     $params->setName($name_parts[0]);
     if (isset($name_parts[1])) {
         $params->setOption('type', $name_parts[1]);
     }
 }
Exemplo n.º 3
0
 /**
  * @param InvokableParams $params
  */
 protected function process(InvokableParams $params)
 {
     $name = $params->getName();
     $values_callback = $params->getValuesCallback();
     $values = $values_callback($name);
     if (is_array($values)) {
         return;
     }
     $params->setValue([$name => $values]);
 }
Exemplo n.º 4
0
 /**
  * @param InvokableParams $params
  */
 protected function process(InvokableParams $params)
 {
     $params->setValue(call_user_func($this->middleware, $params->getName(), $params->getValuesCallback(), $params->getOptions()));
 }