On 07/14/2016 09:27 AM, Ciaran McNulty wrote:
On Tuesday, 12 July 2016 21:19:00 UTC+1, Larry Garfield wrote:
Eh. You can copy any object, though, with an external clone()
call. So
really, all objects are "copyable", aren't they?
--Larry Garfield
You can certainly prevent an object being cloned, unless you mean a
more complex case?
final class A
{
private function __clone() {}
}
$a = new A;
$b = clone $a; // error - Call to private A::__clone() from ...
-Ciaran
Well yes, I mean that by default any object is clonable, therefore
copy-able, therefore
interface CopyableLinkCollectionInterface extends LinkCollectionInterface {
public function withLink() : self;
public function withoutLink() : self;
}
is a bad name for that interface. That's all we need to name right now,
is that interface. :-) Copyable is too generic, Withable sounds too
weird, they're not mutators to Mutable*Interface is wrong. Other
suggestions?
--Larry Garfield
--
You received this message because you are subscribed to the Google Groups "PHP
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/php-fig/5787F319.80608%40garfieldtech.com.
For more options, visit https://groups.google.com/d/optout.