Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:115857 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 18629 invoked from network); 26 Aug 2021 14:01:27 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 26 Aug 2021 14:01:27 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 481191804CF for ; Thu, 26 Aug 2021 07:35:57 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS15169 209.85.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 26 Aug 2021 07:35:56 -0700 (PDT) Received: by mail-lj1-f172.google.com with SMTP id m4so5509025ljq.8 for ; Thu, 26 Aug 2021 07:35:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=1YlF1p0bGSeYu1W8H436EUvctT0K8gvmMOpp5w7vXxk=; b=kC5XPH3HflFThO8gF3jePtK/MP0w49JRGCTu8o50EhHmPxCGYlVJhYDQUcxNfMjhi5 QQp/NBY7zhqGwyxb/mQ0/ojPCtCU8nToKV4371IMZT6lh/kk0TBT1TcykaAt3Mk/dAlb S8105QsqbJsssq2ZCgJlNRLAeTi1NhLjyhXLSpp4wyENVfMLc44gymaA3wybfvuuXrDR cbDYtxT1TrmJrjB3+IRkK4e1NPKQHorCVOiLghVeN/tNnMEg/3FtptBeblvmS+htEGYP EnU8yUlS8dSTDF4GqHkP+ifJEtXsrN5YOP0vXYhwLyoGw6625GObJ5grJhAz7mM8Hnow 0s9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=1YlF1p0bGSeYu1W8H436EUvctT0K8gvmMOpp5w7vXxk=; b=cjAp0QIElNKz6FvGkY3zim7Vf+aCO85rn8V+eEzC+TOy5stutj1Osp18HAj2FOX0kD 6V7ttXR9MTMTT0KcFwXiCGO3bFQwMkXFI/4Jucl/nh5iTt8NunFFSsZ5D0M/KYFIYo9F EfvRYN/AhIA/ECGUbMOPoVpk+N2Wltewfb90heSyjg2gt3bI6ghwdnmdn3cruu8+RD6E GJ3H3ZtqwjRBwLNLf93RTM3oYT2A5BKAFbHdaQrwaBqawO8ADU+rSqtLxCieYNFxXKnr F9bxNGJOFV1IASaHR4dIazg8U+qI9veHslLFTtTh5oPI4HqlS1WEGjefui0oAMPgD0q2 +aRA== X-Gm-Message-State: AOAM532YEpXEBhOe0ojlvMo7K6173iqPB28nMd99V4lQiCvmVwSrWSNb moQxp1YG/qh+GXW+caJ6IL6e44ew6QLJDbazoHE= X-Google-Smtp-Source: ABdhPJzVnjNEFIjyI/fzX/SLeQx5c1SJNnOj1G4zEFsGrpWGcODK12s60s7r+iD4xJSo/KkDVZsK6XTNgWJZTaHx9Sg= X-Received: by 2002:a2e:9283:: with SMTP id d3mr3477139ljh.196.1629988555209; Thu, 26 Aug 2021 07:35:55 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:ab3:6384:0:0:0:0:0 with HTTP; Thu, 26 Aug 2021 07:35:54 -0700 (PDT) In-Reply-To: References: Date: Thu, 26 Aug 2021 16:35:54 +0200 Message-ID: To: "Christoph M. Becker" Cc: PHP internals Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: Alternatives for encapsulation when using composition instead of inheritance From: olleharstedt@gmail.com (=?UTF-8?Q?Olle_H=C3=A4rstedt?=) 2021-08-26 16:20 GMT+02:00, Christoph M. Becker : > On 26.08.2021 at 15:47, Olle H=C3=A4rstedt wrote: > >> * Friend classes, like in C++: Class B is annotated to be a friend of >> A, so class A can see the content of class B but no other class can. > > has been declined. > >> * Namespace private: Class A and B are defined in the same namespace, >> so they can see each other's properties that are defined as "internal" > > appears to be inactive. > > -- > Christoph M. Becker > Thanks! I'll check the belonging discussions on externals.io Olle