Question about :: in Tutorial

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
EricS
Forum Contributor
Posts: 183
Joined: Thu Jul 11, 2002 12:02 am
Location: Atlanta, Ga

Question about :: in Tutorial

Post by EricS »

I was reading Jason's tutorial located here: http://www.phpcomplete.com/tutorials.ph ... adTutorial

Some of the code in the tutorial is as follows:

Code: Select all

Kernel::includeObject('XML/XMLReader');
XMLReader::readFileInto('file.xml', $xmlfile);


class Kernel
{
        /**
        *       Includes an object file for use in an application.
        */
        function includeObject ( $namespace )
        {
                require_once dirname(__FILE__).'/'.$namespace.'.php';
                return $namespace::_autoInclude();
        }

        /**
        *       Takes 2 arguments, on the file name, the
        *       other is the variable that will
        *       contain the object. PassedByRef.
        */
        function includeObjectInto ( $namespace, &$object )
        {
                require_once dirname(__FILE__).'/'.$namespace.'.php';
                return $namespace::_autoIncludeInto($object);
        }
}
What is puzzling me is the "::". What does that do? Is it just a naming convention. I tried "::" in php.net and got no results.

Anyone familiar with this?
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

it is a way of refering to a base class instead of creating an instance of it. here is some reading for you. http://www.php.net/manual/en/keyword.pa ... otayim.php
User avatar
Takuma
Forum Regular
Posts: 931
Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:

Post by Takuma »

What does "paamayim nekudotayim" mean? 8O
It sounds gibrish.
Rob the R
Forum Contributor
Posts: 128
Joined: Wed Nov 06, 2002 2:25 pm
Location: Houston

Post by Rob the R »

Apparently, it's Hebrew:
paamayim means two times
nekudotayim means two punctuations or two vowels
I found this at:
http://groups.google.com/groups?q=paama ... .tw&rnum=1
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

i noticed the odd url name but i ignored it and passed it along anyway. it contains the info needed.
User avatar
Takuma
Forum Regular
Posts: 931
Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:

Post by Takuma »

Interestring how they call it :roll:
Post Reply