Menu

$package

Winston Tamblyn

Packaging allows us to organize our classes, or modules, into namespaces.

Example:

$package(['path.to',] function packageDef($) { ... })

The first argument is optional and is a string representation of the namespace we are currently working in.

packageDef is a function that accepts one parameter to be dubbed the internal object. This object holds information relative to the package such as:

  • imported classes
  • internal members
  • static members of the class being defined

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.