*/ class ParTCP_Local_Id_Provider { public $localIdModel; public function __construct( $localIdModel ){ $this->localIdModel = $localIdModel; } function get_info( $id, $message = NULL ){ global $Config, $Events, $ServerData; list ( $id, $server ) = explode( '@', $id ) + ['','']; if ( $server && $server != $ServerData['name'] ){ return FALSE; } // if an event id is provided, check event participants first if ( is_object( $Events ) ){ if ( strpos( $id, '+' ) ){ list ( $eventId, $id ) = explode( '+', $id ); } if ( isset( $eventId ) || $message && $eventId = $message->get('Event-Id') ){ $this->localIdModel->set_base_dir( $Events->get_dir( $eventId ) ); $data = $this->localIdModel->get_data( $id ); if ( ! empty( $data['id'] ) ){ return $data; } $this->localIdModel->set_base_dir(); } } $data = $this->localIdModel->get_data( $id ); if ( empty( $data['id'] ) ){ return FALSE; } return $data; } } // end of file local_id_provider.class.php