public static function compile (array $metadata, Component $parent, $prepend = false)
  {
    foreach ($metadata as $item) {
      if (!$item instanceof self) {
        $parent->addChild ($item->cloneWithContext ($parent->context), $prepend);
        continue;
      }
      $tag      = $item->getTagName ();
      $propName = lcfirst ($tag);
      // Insert metadata
      if ($parent->props && !($parent instanceof self) && $parent->props->defines ($propName)) {
        if ($parent->props->getTypeOf ($propName) == type::collection) {
          $comp =
            new self ($parent->context, $tag, $parent->props->getRelatedTypeOf ($propName), $item->props->getAll (),
              $item->bindings);
          if ($prepend)
            array_unshift ($parent->props->$propName, $comp);
          else array_push ($parent->props->$propName, $comp);
        }
        else {
          $comp = new self ($parent->context, $tag, $parent->props->getTypeOf ($propName), $item->props->getAll (),
            $item->bindings);
          $parent->props->set ($propName, $comp);
        }
      }
      // Insert content
      else {
        $comp = $tag === 'Text'
          ? Text::from ($parent->context, $item->value)
          : $parent->context->createComponentFromTag ($tag, $parent, $item->props->getAll (), $item->bindings);
        $parent->addChild ($comp, $prepend);
      }
      // Now, compile the children.
      if ($item->hasChildren ())
        self::compile ($item->getChildren (), $comp);
    };
  }