<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 10/02/2021 16:59, Ryan Joseph via
      fpc-pascal wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:9D810D6C-8BCF-47F8-93B6-EE3059DBB645@gmail.com">
      <pre class="moz-quote-pre" wrap="">• PHP (trait): <a class="moz-txt-link-freetext" href="https://www.php.net/manual/en/language.oop5.traits.php">https://www.php.net/manual/en/language.oop5.traits.php</a>

</pre>
    </blockquote>
    <br>
    The example exposes another aspect:<br>
    <br>
    <blockquote type="cite"><code><span style="color: #000000"><span
            style="color: #007700">trait </span><span style="color:
            #0000BB">SayWorld </span><span style="color: #007700">{<br>
                public function </span><span style="color: #0000BB">sayHello</span><span
            style="color: #007700">() {<br>
                    </span><span style="color: #0000BB">parent</span><span
            style="color: #007700">::</span><span style="color: #0000BB">sayHello</span><span
            style="color: #007700">();</span></span></code></blockquote>
    <br>
    <code>In this case the trait has access to the object/class into
      which it is embedded. (otherwise it could not call the inherited
      method of the outer class).<br>
      <br>
      Is that wanted?<br>
      (methods and fields?)<br>
      <br>
      If that is wanted....<br>
      - If it will be using the existing "object" (or advanced record),
      then such code is not possible.<br>
      - One might have to think about how to declare what a trait can
      access? <br>
         Just allow anything in the code, and attempt to resolve when
      the trait is embedded? IMHO maybe not?<br>
      <br>
    </code><br>
  </body>
</html>