Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 52127 Details for
Bug 161239
support for oop method overloading (__call) for php5
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
BugContent... bugzilla doesn't save anything in content...
bugcontent.txt (text/plain), 1.76 KB, created by
Sang Uk Seong
on 2006-10-17 10:48:39 EDT
(
hide
)
Description:
BugContent... bugzilla doesn't save anything in content...
Filename:
MIME Type:
Creator:
Sang Uk Seong
Created:
2006-10-17 10:48:39 EDT
Size:
1.76 KB
patch
obsolete
>some reason, content of my bug is not submitted. > >based on http://us2.php.net/manual/en/language.oop5.overloading.php and http://us2.php.net/manual/en/language.oop5.overloading.php, I set up in AbstractClass to handle all setter calls and getter calls from __call() method. > >code assist of course cannnot see our dynamic getters and setters at the point. > >I know it won't be easy to implement this feature but this should be something PHP IDE needs to detect somehow -- since php offers this feature :) > >I have AbstractDefaultClass that contains following methods: > > /** > * Dynmaic function call to set getter/setter > * all variable must start lower case and mixed mode > * e.g. property testPropertyName->getTestPropertyName() > * @param string $method method of function call > * @param Array $arguments String array arguments > * @return Mixed > */ > public function __call($method, $arguments) { > > // allow isXXX for boolean > if ($method[0] == "i" && $method[1] == "s") { > $prefix = "is"; > $property = strtolower(substr($method, 2, 1)) . substr($method, 3); > } else { > $prefix = strtolower(substr($method, 0, 3)); > $property = strtolower(substr($method, 3, 1)) . substr($method, 4); > } > > if (empty($prefix) || empty($property)) { > return; > } > > if (($prefix == "is" && is_bool($this->$property)) || > ($prefix == "get" && isset($this->$property))) { > return $this->$property; > } > > if ($prefix == "set") { > $this->$property = $arguments[0]; > } > } > >It would be nice that PHP IDE recognize this handler and offer code assist if a class extending this AbstractDefaultClass...
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 161239
:
52126
| 52127