xPDO.setPackage
Last updated not available | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn morexPDO::setPackage¶
Registers a package with xPDO, exactly like addPackage, and additionally sets the package's table prefix as the global default prefix. The global prefix is used for classes that are not part of a registered package.
Syntax¶
boolean setPackage (string $pkg = '', [string $path = ''], [string|null $prefix = null], [string|null $namespacePrefix = null])
Example¶
$xpdo->setPackage('MyVendor\\MyPackage', MODX_CORE_PATH . 'components/mypackage/model/', null, 'MyVendor\\MyPackage\\');
See Also¶
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn more










