> For the complete documentation index, see [llms.txt](https://docs.cmsfullform.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cmsfullform.com/documents/core.md).

# Core

The `Core` directory in PHPFast contains essential components that power the framework, playing a crucial role in handling requests and managing the basic processes of the application. Below is a detailed description of the key files in the `Core` directory:

## [AppException](https://docs.cmsfullform.com/documents/core/appexception.md)

This file contains the `AppException` class, which is used to handle exceptions in the application. The class provides a way to manage errors and display appropriate error messages, helping developers quickly identify and fix issues during development.

## [BaseController](https://docs.cmsfullform.com/documents/core/basecontroller.md)

The `BaseController` class is the base class for all controllers in the application. It contains common methods that all controllers can inherit, making it easier to reuse code and organize actions within the application systematically.

## [BaseModel](https://docs.cmsfullform.com/documents/core/basemodel.md)

The `BaseModel` class is the base class for all models in the application, facilitating interaction with the database. Common methods like querying, saving, or updating data are defined in this class, allowing other models to easily inherit and reuse the functionality.

## [BaseBlock](https://docs.cmsfullform.com/documents/core/baseblock.md)

The base class for blocks in the system. Blocks are reusable components that can be used to display content in different parts of the application. The `BaseBlock` defines common methods and properties for blocks, such as setting and getting properties, rendering content, and handling data. This helps manage and display content flexibly and consistently.

## [Router](https://docs.cmsfullform.com/documents/core/router.md)

The `Router` class is responsible for managing the application's routes. It takes incoming URL requests and maps them to the corresponding controller methods, ensuring requests are routed accurately and efficiently.

{% hint style="info" %}
Summary

All the files in the `Core` directory together form the foundation of PHPFast, handling HTTP requests, managing errors, routing, and providing the essential functionality needed for the application.
{% endhint %}


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.cmsfullform.com/documents/core.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
