You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 16, 2019. It is now read-only.
Frank Kleine edited this page Apr 7, 2012
·
1 revision
Developer pages: Coding Guidelines
Namespaces
This section applies to Stubbles versions with namespaces.
Namespace and all imports are defined after the file doc comment.
<?php
/**
*Short description of file - most times this is identical with class description.
*
*@author Frank Kleine <mikey@stubbles.net>
*@package stubbles
*@subpackage examples
*@version $Id$
*/
namespace net::stubbles::example;
use net::stubbles::util::Binford;
/**
*Short description of class.
*
*@package stubbles
*@subpackage examples
*/
class ExampleNamespacedClass extends net::stubbles::lang::BaseObject
{
public function __construct(Binford $binford, ::Iterator $iterator)
{
...
}
}
?>
Classes from the global space and PHP internal classes should always be referenced with ::Classname.
Stubbles classes all reside in the net::stubbles package.