Changes between Version 2 and Version 3 of phpgwapi/how_does_API_work


Ignore:
Timestamp:
03/29/10 15:59:55 (14 years ago)
Author:
rodsouza
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • phpgwapi/how_does_API_work

    v2 v3  
    310310        ) 
    311311}}} 
     312 
     313Seguindo o fluxo existe uma verificação da obrigatoriedade da utilização de conexão segura. 
     314 
     315{{{ 
     316#!php 
     317    if( @isset( $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'enforce_ssl' ] ) && ! $_SERVER[ 'HTTPS' ] ) 
     318    { 
     319        Header( 'Location: https://' . $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'hostname' ] . $GLOBALS[ 'phpgw_info' ][ 'server' ][ 'webserver_url' ] . $_SERVER[' REQUEST_URI' ] ); 
     320        exit; 
     321    } 
     322}}} 
     323 
     324Se for obrigatório o uso de conexão segura então todo o processo descrito até o momento será novamente executado. 
     325 
     326O passo seguinte é instânciar as classes '''errorlog, translation, common, hooks, auth, accounts, acl, sessions, preferences, applications'''. 
     327 
     328{{{ 
     329#!php 
     330    $GLOBALS['phpgw']->log          = CreateObject('phpgwapi.errorlog'); 
     331    $GLOBALS['phpgw']->translation  = CreateObject('phpgwapi.translation'); 
     332    $GLOBALS['phpgw']->common       = CreateObject('phpgwapi.common'); 
     333    $GLOBALS['phpgw']->hooks        = CreateObject('phpgwapi.hooks'); 
     334    $GLOBALS['phpgw']->auth         = CreateObject('phpgwapi.auth'); 
     335    $GLOBALS['phpgw']->accounts     = CreateObject('phpgwapi.accounts'); 
     336    $GLOBALS['phpgw']->acl          = CreateObject('phpgwapi.acl'); 
     337    $GLOBALS['phpgw']->session      = CreateObject('phpgwapi.sessions'); 
     338    $GLOBALS['phpgw']->preferences  = CreateObject('phpgwapi.preferences'); 
     339    $GLOBALS['phpgw']->applications = CreateObject('phpgwapi.applications'); 
     340}}}