Download the PHP package vulcanphp/hyper-core without Composer
On this page you can find all versions of the php package vulcanphp/hyper-core. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download vulcanphp/hyper-core
More information about vulcanphp/hyper-core
Files in vulcanphp/hyper-core
Package hyper-core
Short Description Core Classes of Hyper MVT Framework
License MIT
Informations about the package hyper-core
HyperCore
Core Classes and Functionalities for Hyper MVT Framework
Introduction
HyperCore is the backbone of the Hyper MVT Framework, providing essential core classes, utility functions, and helper methods to streamline web development. This document details all available classes and functions within the HyperCore.
Core Classes
Application
- Class:
Application
- Description: Application container that manages the overall lifecycle of your Application.
Container
- Class:
Container
- Description: Simple IoC container for resolving dependencies.
Database
- Class:
Database
- Description: PDO Database container for managing database connections and operations.
- Example:
Request
- Class:
Request
- Description: HTTP request class for handling and processing incoming requests.
Response
- Class:
Response
- Description: HTTP response class for managing outgoing responses.
Middleware
- Class:
Middleware
- Description: Middleware class for handling HTTP request routing.
Router
- Class:
Router
- Description: Router class for defining and handling application routes.
Model
- Class:
Model
- Description: Model class for handling database interactions with ORM and form handling.
- Example:
Query
- Class:
Query
- Description: PHP PDO query builder for constructing and executing database queries.
Session
- Class:
Session
- Description: Session class for managing user sessions.
Template
- Class:
Template
- Description: Template engine class for rendering views.
Translator
- Class:
Translator
- Description: Translator helper class to retrieve translated text.
Utility Classes
Auth
- Class:
Auth
- Description: Handles user authentication and authorization for the Hyper framework.
Cache
- Class:
Cache
- Description: Cache class for caching data.
Collect
- Class:
Collect
- Description: Collection class for handling arrays.
Hash
- Class:
Hash
- Description: Class for hashing and encryption.
Image
- Class:
Image
- Description: Image helper class for managing image operations.
- Example:
Paginator
- Class:
Paginator
- Description: Paginator class for handling pagination.
- Example:
Ping
- Class:
Ping
- Description: HTTP ping/cURL helper class.
- Example:
Uploader
- Class:
Uploader
- Description: File uploader class for managing file uploads.
- Example:
Sanitizer
- Class:
Sanitizer
- Description: Sanitizer class provides methods to sanitize and validate different data types.
- Example:
Validator
- Class:
Validator
- Description: HTTP input validator class.
- Example:
Helper Classes
- Class:
Mail
- Description: PHP built-in mail class.
- Example:
ORM
- Class:
Orm
- Description: Object-Relational Mapper for database interactions.
- Example:
Uploader
- Class:
Uploader
- Description: Uploader helper for managing model uploads.
- Example:
Vite
- Class:
Vite
- Description: Vite helper class for asset management.
Shortcut Functions
Application
- Function:
app()
- Description: Returns the application instance.
Container
- Function:
container()
- Description: Returns the Container instance.
- Functions:
get(string $abstract): mixed
- Retrieve an instance of the given class or interface from the application container.has(string $abstract): bool
- Checks if a given abstract has a binding in the container.bind(string $abstract, $concrete = null): void
- Registers a service provider with the application's dependency injection container.singleton(string $abstract, $concrete = null): void
- Registers a singleton service provider with the application's dependency injection container.
Request
- Function:
request()
- Description: Returns the request instance.
Response
- Function:
response()
- Description: Returns the response instance.
Redirect
- Function:
redirect()
- Description: Redirects to a different URL and returns void.
Session
- Function:
session()
- Description: Returns the session instance.
Router
- Function:
router()
- Description: Returns the router instance.
Input
- Functions:
validator()
- Validates the given data from request.input()
- Retrieve and sanitize input data.
Database
- Function:
database()
- Description: Returns the database instance.
Query
- Function:
query()
- Description: Returns the query builder instance.
Template
- Function:
template()
- Description: Returns a new template instance.
URLs
- Functions:
url(string $path = ''): string
- Returns the URL for the given path.public_url(string $path = ''): string
- Returns the public URL for the given path.asset_url(string $path = ''): string
- Returns the asset URL for the given path.media_url(string $path = ''): string
- Returns the media URL for the given path.request_url()
- Returns the current requested URL.route_url()
- Returns the route URL.
Directories
- Functions:
app_dir()
- Returns the application directory.root_dir()
- Returns the root directory.
Debugging
- Functions:
dump()
- Dumps data for inspection.dd()
- Dumps data and stops execution.
Environment
- Function:
env()
- Description: Gets application environment variable data.
CSRF & Custom Method
- Functions:
csrf_token()
- Returns the CSRF token.csrf()
- Returns the CSRF token with an HTML hidden input.method()
- Generates a hidden form field containing the specified HTTP method.
Auth
- Function:
auth()
- Returns the logged-in user.user()
- Returns the logged-in user.is_quest()
- Determine if a user logged-in or not.
Collections
- Function:
collect()
- Description: Returns a new collect class instance.
Cache
- Function:
cache()
- Description: Returns a new cache class instance.
Translation
- Function:
__()
- Description: Translates text.
Vite
- Function:
vite()
- Description: Returns a new vite class instance.
Templates
- Functions:
template_exists()
- Checks if a template exists._e()
- Escapes a string for safe output.__e()
- Translates and escapes a given text for safe HTML output.
Many More....
Conclusion
HyperCore provides a set of core functionalities, utility methods, and helper classes to make web development with the Hyper MVT Framework efficient and enjoyable. Whether you are handling HTTP requests, managing databases, or working with templates, HyperCore has you covered.