CampContext::registerObjectType PHP Метод

registerObjectType() приватный закрытый Метод

Register an new object type
private final registerObjectType ( array $p_objectType )
$p_objectType array structure: array(object name => object class name)
    private final function registerObjectType(array $p_objectType)
    {
        try {
            // check the structure
            $keys = array_keys($p_objectType);
            $values = array_values($p_objectType);
            if (count($keys) !== 1 || count($values) !== 1) {
                throw new Exception('CampContext::registerObjectType called with malformed parameter: ' . print_r($p_objectType));
            }
        } catch (Exception $e) {
            $this->trigger_invalid_register_error($e->getMessage());
        }
        CampContext::$m_objectTypes += $p_objectType;
    }