Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85864 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 6822 invoked from network); 18 Apr 2015 15:26:14 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Apr 2015 15:26:14 -0000 Authentication-Results: pb1.pair.com header.from=nikita.ppv@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nikita.ppv@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.212.177 as permitted sender) X-PHP-List-Original-Sender: nikita.ppv@gmail.com X-Host-Fingerprint: 209.85.212.177 mail-wi0-f177.google.com Received: from [209.85.212.177] ([209.85.212.177:36663] helo=mail-wi0-f177.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D5/33-12030-59772355 for ; Sat, 18 Apr 2015 11:26:13 -0400 Received: by wizk4 with SMTP id k4so52608316wiz.1 for ; Sat, 18 Apr 2015 08:26:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=AAGABCD9X4ZoBFfaMx1bNR/VVtS7Zj6uABQudCqgewE=; b=wKzkZlhYCTs6n/JoU8sA0h/mBFk8NqRYC0tDbKFEmpJ5T6VpvZKAZJ/NeDwAVKLuN7 nlmREQcdsd4faf6xAwBokVJDi5oeKyOmZLtgkticW81XzqOZX5KmDqCYlVlDOHsw7TUC IC1nag3zKOpOn1CbNczB8yCkMJ4T5dw7FN8i47uo5OrGqDvbbAzZOs736fo/j4b1YCLC qNvqKUKBGBSeh2qsIXn4wHj+34yk0n7+op54I1Y+Vi67MQQEE2DJv6BVBZR4EfjKGmrO puQtrdPNMrRpQRzw5N+mmEKs7hpgzxpV8SvavuNeCfGuN2iXYQspe0mbiD+er99BS5RN BzUA== MIME-Version: 1.0 X-Received: by 10.194.143.20 with SMTP id sa20mr14757624wjb.16.1429370770767; Sat, 18 Apr 2015 08:26:10 -0700 (PDT) Received: by 10.27.86.133 with HTTP; Sat, 18 Apr 2015 08:26:10 -0700 (PDT) In-Reply-To: References: Date: Sat, 18 Apr 2015 17:26:10 +0200 Message-ID: To: georges Cc: PHP Internals Content-Type: multipart/alternative; boundary=089e0122ece20b429b051401511d Subject: Re: [PHP-DEV] RFC: spl_autoload_register() should provide kind of entity to load From: nikita.ppv@gmail.com (Nikita Popov) --089e0122ece20b429b051401511d Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sat, Apr 18, 2015 at 4:24 PM, georges wrote: > =E2=80=8BHi php internals, > > Currently spl_autoload_register() pass the name of the class entity to th= e > first *Callable* argument=E2=80=8B, but there is now way (as i far i know= ) to know > what kind of entity we're looking for. > -Class ? > -Interface ? > -Trait? > > > A second argument should be added to the *Callable* function describing > what kind of entity we're looking for. > This is not possible, because we do not generally know if something is a class or an interface or a trait when autoloading it. E.g. if I write class_alias('X', 'Y') and X is autoloaded, it could be a class an interface or a trait - it just doesn't matter. Nikita --089e0122ece20b429b051401511d--