replaceName example

$replace = [];
    $type = $definition['type'];
    if (strpos($type, ']')) {
      // Replace variable names in definition.       $replace = is_array($value) ? $value : [];
      if (isset($parent)) {
        $replace['%parent'] = $parent;
      }
      if (isset($name)) {
        $replace['%key'] = $name;
      }
      $type = $this->replaceName($type$replace);
      // Remove the type from the definition so that it is replaced with the       // concrete type from schema definitions.       unset($definition['type']);
    }
    // Add default values from type definition.     $definition += $this->getDefinitionWithReplacements($type$replace);

    $data_definition = $this->createDataDefinition($definition['type']);

    // Pass remaining values from definition array to data definition.     foreach ($definition as $key => $value) {
      
Home | Imprint | This part of the site doesn't use cookies.