Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:97501 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39107 invoked from network); 2 Jan 2017 00:17:34 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Jan 2017 00:17:34 -0000 Authentication-Results: pb1.pair.com smtp.mail=bowersbros@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=bowersbros@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.210.181 as permitted sender) X-PHP-List-Original-Sender: bowersbros@gmail.com X-Host-Fingerprint: 209.85.210.181 mail-wj0-f181.google.com Received: from [209.85.210.181] ([209.85.210.181:33818] helo=mail-wj0-f181.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 31/26-55609-C1C99685 for ; Sun, 01 Jan 2017 19:17:33 -0500 Received: by mail-wj0-f181.google.com with SMTP id sd9so230495995wjb.1 for ; Sun, 01 Jan 2017 16:17:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=1S2Hz0UKMszCiIb6NEq5JHiXu6oGB2Q/KFTPxKDV518=; b=lJAW1y9Ec47N0u35r8skYh6vLAvRra4ow0JTwj2VaveB6ZMaeNZ/2sw/VLZb1+VLXr DepECWbGWQPaZyXTP82NEas8n8ZurHrIgxZUTOW+R4ART1oSngP62OEK3pSpsnB9GoUa uddNPw9DosXFvgYyE/QjPf+y284GkGoo3xExs9OAoeLW5jXmvSyX2D9O0oCwQDTvddwo Y/PhPpKsnCrIOyHAXxffTNxswduvgpYea2YBezTKcCa3y97AfHjwuY6v1wiJzCGHCo5e UA3NMO3N+zq/w4CdxsBFsfXXeUzgFVJmL/BFp0ay/eZdQSk1RTBHJ0TjtLejCXdDaXkR lWQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=1S2Hz0UKMszCiIb6NEq5JHiXu6oGB2Q/KFTPxKDV518=; b=aynqH9r6P4GqGz7n5SFeHYhPI7foPasXY6ZhBYdDQIFfdRvbF1/eRhRT/voUBOunK5 AHZ/dkrgkQCWqlKDUH2j78hY1cysJcfHAzG7k50Qh+fWfFUQSRlY7QKTmsQWbw0Cucy7 CQU4kQarnfjL/Auc8uvd4VPOHt5bA/PUuJoma35AD4hr4XVUmi1xLLnr9mUPhWXyAnnZ P0kKkyVPd9yTe+8OcA+9cRdSq5Z+0g1c8ArEayom6NKPZWNBe746IBPEvKSzVPCS/FbD LMZJqukI5uSTH6DYZbKAIYFlECVomqXeECszhukcA4AUvV4RwqrAjwj8KjzZoRzZ5k3R eEmA== X-Gm-Message-State: AIkVDXIK2MddlADIEId/EgzpxiGn3HH4U+OrQbxqhm5f4j73xtLZRRfWuGl34SZWoT6znPN5amCZWgKWVV3g7w== X-Received: by 10.194.221.4 with SMTP id qa4mr56957208wjc.179.1483316248794; Sun, 01 Jan 2017 16:17:28 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.232.77 with HTTP; Sun, 1 Jan 2017 16:17:28 -0800 (PST) Date: Mon, 2 Jan 2017 00:17:28 +0000 Message-ID: To: PHP Content-Type: multipart/alternative; boundary=001a11c3ae5e195dd60545117ad1 Subject: [Discussion] Autoload anonymous classes From: bowersbros@gmail.com (Alex Bowers) --001a11c3ae5e195dd60545117ad1 Content-Type: text/plain; charset=UTF-8 Hi All, Currently, autoloading works based on a class being included / required. However, there are some circumstances whereby an anonymous class being given a name, but not being based in the filesystem could be useful. An example of this is in the upcoming 5.4 release of Laravel, with real-time facades. The way this works is that the autoloader hooks in based on the namespace being called, and based on some conditions, creates a file in a cache folder on the system, and then includes / requires that file to have it autoloaded. It would be quite useful to not have to write to the filesystem, but instead allow anonymous classes to be built up and returned as "named" classes in the autoloader. Based on the classname that was requested, the anonymous class can be effectively named and kept in memory for usage, similar to it being written to a file and included. Thoughts? Thanks. --001a11c3ae5e195dd60545117ad1--