Exemplo n.º 1
0
 /**
  * ><p>**Note:** for use by MacroCall.
  *
  * @param string $name
  * @return false|null|string
  * @throws ComponentException
  */
 public function getParameterType($name)
 {
     $param = $this->getParameter($name);
     if (isset($param)) {
         $p = type::getIdOf($param->props->type);
         if ($p === false) {
             $s = join('</kbd>, <kbd>', type::getAllNames());
             throw new ComponentException($this, "The <kbd>{$name}</kbd> parameter has an invalid type: <kbd>{$param->props->type}</kbd>.<p>Expected values: <kbd>{$s}</kbd>.");
         }
         return $p;
     }
     return null;
 }