[ phpeclipse-Bugs-1501248 ] Parser error in new self::$_class()
"SourceForge.net" <[email protected]> Sun, 06 May 2007 19:20:04 -0700
| Newsgroups | gmane.comp.ide.eclipse.phpeclipse.devel |
|---|---|
| Message-ID | <[email protected]> |
Bugs item #1501248, was opened at 2006-06-05 14:32
Message generated for change (Comment added) made by sf-robot
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=484801&aid=1501248&group_id=57621
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Closed
Resolution: None
Priority: 5
Private: No
Submitted By: Lukas Zapletal (lzap)
Assigned to: Nobody/Anonymous (nobody)
Summary: Parser error in new self::$_class()
Initial Comment:
public static function getInstance() {
if (!isset(self::$_instance)) {
self::$_instance = new self::$_class();
} // if
return self::$_instance;
} // getInstance
leads to
self::$_instance = new self::$_class();
^^^
Parser error "';' expected after expression (Found
token: not-a-token(63) ::)"
----------------------------------------------------------------------
>Comment By: SourceForge Robot (sf-robot)
Date: 2007-05-06 19:20
Message:
Logged In: YES
user_id=1312539
Originator: NO
This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).
----------------------------------------------------------------------
Comment By: Toshihiro (toshihiro)
Date: 2007-04-22 01:46
Message:
Logged In: YES
user_id=1527096
Originator: NO
Fixed in CVS.
----------------------------------------------------------------------
Comment By: jpieper (jpieper)
Date: 2007-04-11 06:55
Message:
Logged In: YES
user_id=1668432
Originator: NO
Here is a live code snippet from Zend Framework
(http://framework.zend.com/), were I get the syntax error.
Code Snippet:
* Zend Framework - Zend/Registry.php (rev4223)
--- SNIP
---------------------------------------------------------------------------
<?php
class Zend_Registry
{
/**
* Class name of the singleton registry object.
* @var string
*/
private static $_registryClassName = 'Zend_Registry';
/* ... */
/**
* Initialize the default registry instance.
*
* @return void
* @throws Zend_Exception if default registry is already initialized.
*/
protected static function init()
{
self::setInstance(new self::$_registryClassName());
}
--- SNAP
---------------------------------------------------------------------------
I get the same error and it will be marked as a syntax error so you
needn´t know what "$_registryClassName" contains or something. It is a bug
in phpeclipse and i´ll be happy if it can be fixed.
----------------------------------------------------------------------
Comment By: freeman (freeman3)
Date: 2006-10-17 06:09
Message:
Logged In: YES
user_id=1059466
i have the same problem
.... = new self::$self_class_name[0]();
$self_class_name can be anything array in this case
----------------------------------------------------------------------
Comment By: Luis Bernardo (lmpmbernardo)
Date: 2006-06-20 20:26
Message:
Logged In: YES
user_id=137011
can you provide a full fledged example? is this a singleton?
where does the $_class come from?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=484801&aid=1501248&group_id=57621
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Phpeclipse-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/phpeclipse-devel