> 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](/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](/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](/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](/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](/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 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://docs.cmsfullform.com/documents/core.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.
