Page 1 of 1

Question about :: in Tutorial

Posted: Tue Dec 17, 2002 8:03 am
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?

Posted: Tue Dec 17, 2002 8:59 am
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

Posted: Tue Dec 17, 2002 10:48 am
by Takuma
What does "paamayim nekudotayim" mean? 8O
It sounds gibrish.

Posted: Tue Dec 17, 2002 11:13 am
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

Posted: Tue Dec 17, 2002 8:38 pm
by mydimension
i noticed the odd url name but i ignored it and passed it along anyway. it contains the info needed.

Posted: Wed Dec 18, 2002 4:33 am
by Takuma
Interestring how they call it :roll: