Download the PHP package tamedevelopers/support without Composer
On this page you can find all versions of the php package tamedevelopers/support. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download tamedevelopers/support
More information about tamedevelopers/support
Files in tamedevelopers/support
Download tamedevelopers/support
More information about tamedevelopers/support
Files in tamedevelopers/support
Vendor tamedevelopers
Package support
Short Description Support Package For Tamedevelopers
License MIT
Homepage https://github.com/tamedevelopers/support
Package support
Short Description Support Package For Tamedevelopers
License MIT
Homepage https://github.com/tamedevelopers/support
Please rate this library. Is it a good library?
Informations about the package support
Support Package
Support Package For Tamedevelopers
Documentation
- Requirements
- Installation
- All Paths
- Number to Words
- Zip
- Time
- Cookie
- Hash
- Asset
- Asset config
- Asset Cache
- Asset config
- Env
- Env Load
- Env Update
- Server
- Get Servers
- Create Custom Config
- Create Config Template File
- Autoload Register
- Helpers Functions
- Error Dump
- Error Status
- Useful links
Requirements
>= php 8.0+
Installation
Prior to installing support package
get the Composer dependency manager for PHP because it'll simplify installation.
All Paths
function name | Description |
---|---|
base_path() | Get absolute base directory path. Accepts a param string if given, and append to path |
directory() | Same as base_path() |
public_path() | Root/public path. Accepts a param string if given, and append to path |
app_path() | Root/app path. Accepts a param string if given, and append to path |
config_path() | Root/config path. Accepts a param string if given, and append to path |
lang_path() | Root/lang path. Accepts a param string if given, and append to path |
domain() | Returns domain URI. Accepts a param string if given, and append to path |
Number to Words
- Has three chainable methods
iso (country iso3) | cents | number |
---|---|---|
COUNTRY ISO 3 AFG \| NGA \| GBR \| USA |
true \| false |
int\|float\|string |
If iso is given, it'll automatically converts the text into a currency format |
cents currency format shows, when there's a decimal point in the number | numeric figures: 299 \| '42,982' \| 3200.98 |
ISO
- Takes param as
string
and case-insensitive
Cents
- Takes param as
boolean
. Default isfalse
Number
- Takes two param as
int | float | string
and [optional] cents asboolean
- If you do not want to call the cents method, then we can call it directly here
Usage
Zip
- Takes two param as
string
- [sourcePath] relative path of zip-file
- [destination] relative folder path to save zip file
Unzip
- Takes two param as
string
- [sourcePath] relative path of zip-file
- [destination] relative folder path to unzip-file
Download
- Takes two param as
string | boolean
- [fileName] relative path of zip-file
- [unlink] Default is
true
unlinks file after download
Time
Cookie
function name | Description |
---|---|
set() | Used to set cookie |
get() | Used to get cookie |
forget() | Used to expire cookie |
exire() | Same as forget method |
all() | Get all available cookie |
has() | Cookie exists |
Set
- Takes
7 param
- Mandatory
$name
param asstring
- [optional]
$value
param asstring | null
- [optional]
$minutes
param asint | string
- [optional]
$path
param asstring | null
- [optional]
$domain
param asstring | null
- [optional]
$secure
param asbool | null
- [optional]
$httponly
param asbool | null
- Mandatory
Get
- Takes param as
string
Forget
- Takes
3 param
- Mandatory
$name
param asstring
- [optional]
$path
param asstring | null
- [optional]
$domain
param asstring | null
- Mandatory
Has
-
Takes param as
string
- Returns
bool
- Returns
- or --
Helpers Function
Hash
- Password hashing and verify
Password verify
Asset
-
Takes a param as
string
path to asset file- Default [dir] is set to
public
- Default [dir] is set to
- or --
Helpers Function
Asset Config
-
Takes two param as
string
base_path
path base directorycache
Tells method to returncache
of assets.
- or --
Helpers Function
Asset Cache
-
By Default,
cache
is set totrue
- You'll see a link representation as
http://domain.com/[path_to_asset_file]?v=111111111
- You'll see a link representation as
- or --
Helpers Function
ENV
- By default it use the default root as
.env
path, so mandatory to install vendor in root directory.
ENV Load
-
To load the environment
.env
file- Takes optional param as
string
$path
- Takes optional param as
- or --
loadOrFail('optional_path')
- Just as the name says. It'll load the
.env
file or fail with status code of 404. An error logger will also be created insidestorage/logs/orm.log
- Just as the name says. It'll load the
ENV Update
- Returns
true|false
. Used to update env variables
Params | Description |
---|---|
key | ENV key |
value | ENV value |
allow_quote | true \| false - Default is true (Allow quotes within value) |
allow_space | true \| false - Default is false (Allow space between key and value) |
- or --
Helpers Function
Server
- Return instance of
Server
Get Servers
-
Returns assoc arrays of Server
server\|domain
- or --
Helpers Function
Create Custom Config
- With this helper you can be able to create your own custom config by extending the Default Config Method
- When using this model, make sure every of your php file returns an associative array for the key to work
Params | Description |
---|---|
key | File array key |
default | Default value if no data is found from the key |
folder | Folder to search from and Default folder is config |
-
Create our own config to extends the default
- or --
Helpers Function
Autoload Register
- Takes an
string\|array
as param- You can use register a folder containing all needed files
- This automatically register
Files\|Classes
in the folder and sub-folders.
Helpers Functions
function name | Description |
---|---|
env() | env method To get environment variable |
server() | Return instance of (new Server) class |
to_array() | array Convert value to array |
to_object() | object Convert value to object |
to_json() | string Convert value to json |
Error Dump
function | Description |
---|---|
dump | Dump Data |
dd | Dump and Die |
Useful Links
- @author Fredrick Peterson (Tame Developers)
- If you love this PHP Library, you can Buy Tame Developers a coffee
All versions of support with dependencies
PHP Build Version
Package Version
Requires
php Version
>=8.0
ext-ctype Version *
ext-mbstring Version *
symfony/var-dumper Version *
symfony/console Version ^6.2
cocur/slugify Version ^4.2.0
vlucas/phpdotenv Version ^5.4.1
filp/whoops Version ^2.15
ext-ctype Version *
ext-mbstring Version *
symfony/var-dumper Version *
symfony/console Version ^6.2
cocur/slugify Version ^4.2.0
vlucas/phpdotenv Version ^5.4.1
filp/whoops Version ^2.15
The package tamedevelopers/support contains the following files
Loading the files please wait ....