Topics related to PHP classes implemented by Drupal core code.

learn more… | top users | synonyms

0
votes
1answer
23 views

Trying to find variable names from $user array

I need to manually pull through user images and and users first name for a comment section, but i cant find what these array items are named, if anybody knows please tell me and or tell me how to find ...
0
votes
1answer
30 views

Problem loading classes in drupal module

I'm having trouble loading classes in drupal7. Let me start with a WORKING EXAMPLE that doesn't have problems. If I create a file called sites/all/modules/johnmodule/test.php with the following ...
0
votes
1answer
40 views

db_select usage in class and returned object

I'd like to use db_select in a static public function of a certain class. The query should be a base query, which may then be customized in the calling function. Returning the result sets seems to ...
1
vote
1answer
868 views

How to add back button for specific content?

Just realised all my pages are now displaying a back button with this code I added to node.tpl.php <FORM><INPUT Type="button" VALUE="Back" onClick="history.go(-1);return ...
2
votes
2answers
325 views

Modules and namespaces

I have strange problem or maybe I'm doing something wrong. I've create my own module. My .info file looks like this: ... files[] = DdFactory.inc files[] = ArticleManager.inc ... In ...
1
vote
2answers
126 views

Using classes in nodes

I need a little bit of guidance, I made a custom class and im trying to use it in a node but of course it throwing a white screen at me. So my question is how can I go about using a custom class for ...
3
votes
5answers
3k views

In Drupal 7, how does Drupal handle autoloading of classes?

How does Drupal handle autoloading of classes through modules? For instance, if I have an Events module, and I declare a class called Event, and then in the .info file I include the class file, how is ...
3
votes
4answers
2k views

What causes the error “Call-time pass-by-reference has been deprecated?”

My understanding is that objects in PHP 5.3 are all passed by reference so using the &$ notation is not necessary. My problem is using date_views module where I'm getting this error. Deprecated ...
15
votes
4answers
3k views

Best practice for building modules using classes

I'm looking to start building my modules as classes now that lazy/auto-load are in Drupal 7, and I'd love to look at some modules (contrib or core) that are doing a great job of it. Is there a ...
3
votes
1answer
250 views

What is the purpose of the PHP class FileTransfer?

What is the purpose of the PHP class FileTransfer? In which cases, should a module deal with that class or one of its child classes?
1
vote
1answer
117 views

What is the difference between the classes ArchiverTar and Archive_Tar?

What is the difference between the classes ArchiverTar and Archive_Tar? Which one is a Drupal module supposed to use?