I have just taken over a programming project from a co-worker and I believe this line:
$item =& Entity::forId('Item', $_GET['id']);
is either PHP or Perl, but I am not entirely sure. Can somebody help me out here?
Is this Object-Oriented Perl or some king of PHP library or what?
I appreciate your help.
Da_riPPer
8:31 pm on Oct 17, 2005 (gmt 0)
It would seem to be PHP... cause of the syntax... but
[edited by: Da_riPPer at 8:36 pm (utc) on Oct. 17, 2005]
Da_riPPer
8:35 pm on Oct 17, 2005 (gmt 0)
But it is not, seein as there is no function in php "forId" that they use in this code. So i'm betting on perl, seeing that perl has such a method.
sned
8:42 pm on Oct 17, 2005 (gmt 0)
This is indeed php .. the Entity::forID() syntax is used with PEAR objects. I'm not sure if it is used elsewhere, but very well could be :)
(Obvious question, but what is the extension of the file that the string is found in?)
-sned
coopster
7:07 pm on Oct 18, 2005 (gmt 0)
I would agree that this looks like PHP. The double colon is a Scope Resolution Operator (::) [php.net] that allows access to static, constant, and overridden members or methods of a class.
JamShady
1:48 am on Oct 19, 2005 (gmt 0)
It is most definately PHP. Entity is just a static object (indicating PHP 5 code)