Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:85952 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 54160 invoked from network); 26 Apr 2015 15:33:38 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 26 Apr 2015 15:33:38 -0000 Authentication-Results: pb1.pair.com smtp.mail=kelerest123@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=kelerest123@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.214.169 as permitted sender) X-PHP-List-Original-Sender: kelerest123@gmail.com X-Host-Fingerprint: 209.85.214.169 mail-ob0-f169.google.com Received: from [209.85.214.169] ([209.85.214.169:36709] helo=mail-ob0-f169.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D5/20-49496-2550D355 for ; Sun, 26 Apr 2015 11:33:38 -0400 Received: by obbeb7 with SMTP id eb7so67721981obb.3 for ; Sun, 26 Apr 2015 08:33:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=OYX0JOUGIoXF4zdgCQe2wZGWN5J6ZOJd31X+5vWwxfs=; b=RNgxBnHzh6tvwoxyizcTR3BFLADejlT2IDeWF9aHE42+dgE1v2WlSQEBO+6PXxAt1e /IhTtedZ/S7ABEX5fm+c0lkd78ecmxE4b4fvC9XLFKegAeUdmEYVdCpXzI5dH4sep0gO fQnwzQzKM2T6ZVeJ9ipop3a9h0wetQ6wQmnuAg6XZYAwcMgvwtij41mMQSkck+6Frk82 2g37srqkHXu5L8XBMcjN2Q/7TFOcCNE0+ED17aGCTdEFAyGvT6533XUqtn2g9h2MqBBV bsXaHtZ29V4sL6z99a/JfpqNmb71KcucoyO2Wb0Yd2M5G3tCCg90wmrr6MHijCaOAeI+ 7lFA== X-Received: by 10.182.106.197 with SMTP id gw5mr6558915obb.30.1430062415622; Sun, 26 Apr 2015 08:33:35 -0700 (PDT) MIME-Version: 1.0 Received: by 10.182.104.7 with HTTP; Sun, 26 Apr 2015 08:33:15 -0700 (PDT) Date: Sun, 26 Apr 2015 17:33:15 +0200 Message-ID: To: Alexander Moskalev , PHP Internals Content-Type: multipart/alternative; boundary=089e015366e04a37c30514a25ab9 Subject: Re: [PHP-DEV] PR 1217: Add support for upload files from buffer string in curl extenion From: kelerest123@gmail.com (=?UTF-8?B?SmFrdWIgS3Viw63EjWVr?=) --089e015366e04a37c30514a25ab9 Content-Type: text/plain; charset=UTF-8 Hey Alexander! 2015-04-22 10:26 GMT+02:00 Alexander Moskalev : > Jakub, I think about static factory methods, but not sure if it will be > great. > I think using empty constructor more clear. > So we can add a setter, which, however, will return $this, to allow chaining and prevent one redundant line of code: setBuffer('some file contents'); // ($fileBuffer instanceof CURLFile) === true But this looks a bit weird and for some people also confusing. Thus it would be even better to have a static factory method, I think. Best regards, Kubo2 --089e015366e04a37c30514a25ab9--