public function getObject($objectName, $new = 0)
    {
        if (isset($this->_objectsMap[$objectName]) && $new == 0) {
            return $this->_objectsMap[$objectName];
        }

        $obj = $this->constructObject($objectName);
        if (!$obj) {
            return null;
        } 
        // save object to cache
        $this->_objectsMap[$objectName] = $obj;
        if ($new != 1) {
            if (method_exists($obj, "loadStatefullVars")) {
                $obj->loadStatefullVars(Openbizx::$app->getSessionContext());
            }
        }

        return $obj;
    }
public function getObject($objectName, $new = 0)
    {
        if (isset($this->_objectsMap[$objectName]) && $new == 0) {
            return $this->_objectsMap[$objectName];
        }

        $obj = $this->constructObject($objectName);
        if (!$obj) {
            return null;
        } 
        // save object to cache
        $this->_objectsMap[$objectName] = $obj;
        if ($new != 1) {
            if (method_exists($obj, "loadStatefullVars")) {
                $obj->loadStatefullVars(Openbizx::$app->getSessionContext());
            }
        }

        return $obj;
    }
public function getObject ( $ objectName , $ new = 0 ) { if ( isset ( $ this -> _objectsMap [ $ objectName ] ) && $ new == 0 ) { return $ this -> _objectsMap [ $ objectName ] ; } $ obj = $ this -> constructObject ( $ objectName ) ; if ( ! $ obj ) { return null ; } // save object to cache $ this -> _objectsMap [ $ objectName ] = $ obj ; if ( $ new != 1 ) { if ( method_exists ( $ obj , "loadStatefullVars" ) ) { $ obj -> loadStatefullVars ( Openbizx :: $ app -> getSessionContext ( ) ) ; } } return $ obj ; }
Get a metadata based object instance.
It returns the instance the internal object map or create a new one and save it in the map.

@param string $objectName name of object that want to get
@return object
Get a metadata based object instance . It returns the instance the internal object map or create a new one and save it in the map .