src/xPDO/xPDO.php
public function setPackage($pkg= '', $path= '', $prefix= null) {
        if (empty($path) && isset($this->packages[$pkg])) {
            $path= $this->packages[$pkg]['path'];
            $prefix= !is_string($prefix) && array_key_exists('prefix', $this->packages[$pkg]) ? $this->packages[$pkg]['prefix'] : $prefix;
        }
        $set= $this->addPackage($pkg, $path, $prefix);
        $this->package= $set == true ? $pkg : $this->package;
        if ($set && is_string($prefix)) $this->config[xPDO::OPT_TABLE_PREFIX]= $prefix;
        return $set;
    }
public function setPackage($pkg= '', $path= '', $prefix= null) {
        if (empty($path) && isset($this->packages[$pkg])) {
            $path= $this->packages[$pkg]['path'];
            $prefix= !is_string($prefix) && array_key_exists('prefix', $this->packages[$pkg]) ? $this->packages[$pkg]['prefix'] : $prefix;
        }
        $set= $this->addPackage($pkg, $path, $prefix);
        $this->package= $set == true ? $pkg : $this->package;
        if ($set && is_string($prefix)) $this->config[xPDO::OPT_TABLE_PREFIX]= $prefix;
        return $set;
    }
public function setPackage ( $ pkg = '' , $ path = '' , $ prefix = null ) { if ( empty ( $ path ) && isset ( $ this -> packages [ $ pkg ] ) ) { $ path = $ this -> packages [ $ pkg ] [ 'path' ] ; $ prefix = ! is_string ( $ prefix ) && array_key_exists ( 'prefix' , $ this -> packages [ $ pkg ] ) ? $ this -> packages [ $ pkg ] [ 'prefix' ] : $ prefix ; } $ set = $ this -> addPackage ( $ pkg , $ path , $ prefix ) ; $ this -> package = $ set == true ? $ pkg : $ this -> package ; if ( $ set && is_string ( $ prefix ) ) $ this -> config [ xPDO :: OPT_TABLE_PREFIX ] = $ prefix ; return $ set ; }
Sets a specific model package to use when looking up classes.

This package is of the form package.subpackage.subsubpackage and will be
added to the beginning of every xPDOObject class that is referenced in
xPDO methods such as {@link xPDO::loadClass()}, {@link xPDO::getObject()},
{@link xPDO::getCollection()}, {@link xPDOObject::getOne()}, {@link
xPDOObject::addOne()}, etc.

@param string $pkg A package name to use when looking up classes in xPDO.
@param string $path The root path for looking up classes in this package.
@param string|null $prefix Provide a string to define a package-specific table_prefix.
@return bool
Sets a specific model package to use when looking up classes .