> For the complete documentation index, see [llms.txt](https://alaniso-de.gitbook.io/alaf-framework/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://alaniso-de.gitbook.io/alaf-framework/beispiele/get.config.php.md).

# get.config.php

Dieses Beispiel zeigt den Aufbau einer Hook-Datei get.config.php und den Aufruf aus einem Modul bzw. den Systemfunktionen...

Hook-Datei: `get.config.php`

```php
<?php
/**
 * This file is part of
 *   
 * XXX
 
 * a module build up within the ALAF - PHP Framework System.
 * Copyright by Andre Lachnicht www.alaniso.de
 *
 * $Revision: 1.1 $
 * $Author: xxx-Gronau / A.Lachnicht $
 * $Date: 2016-07-01 09:10:11 +0200 (Fr, 1. July 2016) $
 */
$hook = function ($module_name, $options, &$config) {
	
	/* $options enthält die kompletten Daten des aktuellen Admins */
	extract ( $options, EXTR_SKIP );
	
	switch ($options ['CONFIG_PARAMETER']) {
		case 'JOB_PATH' :
			include_once (ALAF_MODULES_DIR . DS . 'Lager000' . DS . 'includes' . DS . "class.lager.php");
			include_once (dirname ( dirname ( __FILE__ ) ) . DS . 'includes' . DS . "class.lager391.php");
			$myObj = new Lager391 ();
			$config [$module_name] = array (
					'JOB_PATH' => array (
							'ID' => $module_name,
							'DESCRIPTION' => $myObj->config_get_configuration_xml_value ( 'longtitle' ) . ' (' . $module_name . ')',
							'JOB_PATH' => $myObj->config_get_value ( 'JOB_PATH' ) 
					) 
			);
			unset ( $myObj );
			break;
	}
};
?>

```

Aufruf durch eine Funktion:

```php
	private function job_paths_load() {
		// Zuerst den System-Ordner anlegen:
		$this->_jobpaths ['Standard'] = array (
				'ID' => 'Standard',
				'DESCRIPTION' => af_tran ( 'System Job-Verzeichnis' ),
				'JOB_PATH' => $this->_config ['job_path'] 
		);
		
		// Job-Verzeichnisse über Config-Hook ermitteln:
		$hook_name = 'get.config';
		$hook = load_class ( 'af_hook', $hook_name );
		// set: setzt einen Schlüssel+Wert in die Variable $options
		//      somit kann ein bestimmter Parameter abgefragt werden!
		$hook->set ( 'CONFIG_PARAMETER', 'JOB_PATH' );
		$hook->run ( $jobpath_list );
		if (isset ( $jobpath_list )) {
			if (sizeof ( $jobpath_list ) > 0) {
				foreach ( $jobpath_list as $module => $value ) {
					$this->_jobpaths [$value ['JOB_PATH'] ['ID']] = $value ['JOB_PATH'];
				}
			}
		}
	}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://alaniso-de.gitbook.io/alaf-framework/beispiele/get.config.php.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
