473,500 Members | 1,661 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Do you use _set?

i don't like the magic function because it limits the ability
for ide to list all the class variables.

ss
Sep 30 '07 #1
3 3649
I never use set. I create my own functions that deal only with their
piece of variables.

Sep 30 '07 #2
..oO(news.telus.net)
>i don't like the magic function because it limits the ability
for ide to list all the class variables.
I don't use __set() at the moment, but its counterpart __get(). In my
own component framework it makes it very convenient to directly access
subcomponents without having to explicitly call a function everytime:

Without magic:

$foo->getComponentById('this')->getComponentById('that')->doSomething();

With magic:

$foo->this->that->doSomething();

Micha
Sep 30 '07 #3
$foo->this->that->doSomething();
The thing I don't like about is in IDE "this" and "that" are not going to be
in the autocomplete list. I just don't like to go back and forth
btwn class files.( maybe only me ..)

Most of people working with php don't use ide?

When i work with java in eclipse, it gives you option to "generate setter
and getter"
with class variables selected. Within PDT, i don't get the feature( i guess
i have to make one by myself )


Oct 1 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2014
by: Peter Fox | last post by:
<?php /* Making up class properties on the fly! -------------------------------------- PHP version 4.3.5 An instance of a class can have properties added on the fly. This behaviour...
3
2239
by: michael | last post by:
Hello again, I have a dictionary with the following content : 'LZ': {'type': 'N', 'bytes': '00008'}, 'LVI000': {'type': 'N', 'bytes': '000010'} This could be seen as a interface description...
11
1598
by: Laszlo Zsolt Nagy | last post by:
My problem is about properties and the virtuality of the methods. I would like to create a property whose get and set methods are virtual. I had the same problems in Delphi before and the solution...
2
1532
by: Gianguz | last post by:
I'd like to discuss about the opportunity to have a global objects creator that introduces into a general framework (suited for multithreading) a controlled semantic to manage globals variables...
5
3130
by: Ingo Nolden | last post by:
Hi there, I am writing a smart pointer that is similar to the boost intrusive ptr. I am trying to make it behave like a c++ pointer including the implicit and explicit casting behaviour. Below...
1
2069
by: gianguz | last post by:
In the following example Global is able to create and manage access to objects of any kind (even in a multithreading environment) with and index value attached to. So a Global<0, string> is a...
17
1916
by: Lee Harr | last post by:
I understand how to create a property like this: class RC(object): def _set_pwm(self, v): self._pwm01 = v % 256 def _get_pwm(self): return self._pwm01 pwm01 = property(_get_pwm, _set_pwm)
7
1339
mickey0
by: mickey0 | last post by:
hello, I wrote this but it doens't compile; more or less I see the error; I have to include "pattern.h" instead of "class Pattern" in patternset.h; But I don't understand why: This is the error: ...
1
475
by: Mirco Wahab | last post by:
Alf P. Steinbach wrote: No, there isn't any (afaik). You can look it up here: http://www.boost.org/doc/libs/1_35_0/doc/html/boost_tr1/unsupported.html#boost_tr1.unsupported.unordered_map ...
0
7018
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7235
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6909
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7397
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
3110
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3108
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1431
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
675
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
317
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.