PHP Classes

Ascoos Framework 24: Framework of general purposes classes

Recommend this page to a friend!
     
  Info   Example   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-12-05 (3 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 18 This week: 7All time: 11,363 This week: 10Up
Version License PHP version Categories
afw 24.0.4Custom (specified...8.2System information, Files and Folders, L..., T..., P...
Description 

Author

This package is a framework of general-purpose classes.

It provides several traits and classes to be used by many types of applications.

Currently it provides classes and traits:

- Check memory usage

- Access disk drives

- Array Handles winth extra analysis and GD Charts

Picture of ASCOOS CMS
  Performance   Level  
Name: ASCOOS CMS <contact>
Classes: 21 packages by
Country: Greece Greece
Age: ???
All time rank: 386923 in Greece Greece
Week rank: 3 Up1 in Greece Greece Up
Innovation award
Innovation award
Nominee: 13x

Instructions

For more examples of using the Ascoos Framework see the afw-examples package.

Example

<?php
/**
 * __ _ ___ ___ ___ ___ ___ ____ _ __ ___ ___
 * / _` |/ / / __/ _ \ / _ \ / / / __/| '_ ` _ \ / /
 * | (_| |\ \| (_| (_) | (_) |\ \ | (__ | | | | | |\ \
 * \__,_|/__/ \___\___/ \___/ /__/ \___\|_| |_| |_|/__/
 *
 *
 ************************************************************************************
 * @ASCOOS-NAME : ASCOOS CMS 24' *
 * @ASCOOS-VERSION : 24.0.0 *
 * @ASCOOS-CATEGORY : Framework (Frontend and Administrator Side) *
 * @ASCOOS-CREATOR : Drogidis Christos *
 * @ASCOOS-SITE : www.ascoos.com *
 * @ASCOOS-LICENSE : [Commercial] http://docs.ascoos.com/lics/ascoos/AGL.html *
 * @ASCOOS-COPYRIGHT : Copyright (c) 2007 - 2024, AlexSoft Software. *
 ************************************************************************************
 *
 * @package : ASCOOS FRAMEWORK (AFW)
 * @subpackage : ASCOOS FRAMEWORK Core Disks Example File
 * @source : [ASCOOS FRAMEWORK (AFW)]/tests/disks_drives.php
 * @fileNo :
 * @version : 24.0.0
 * @created : 2024-07-01 20:00:00 UTC+3
 * @updated :
 * @author : Drogidis Christos
 * @authorSite : www.alexsoft.gr
 * @license : AGL-F
 *
 * @since PHP 8.2.0
 */

declare(strict_types=1);

require_once
"../autoload.php";

use
ASCOOS\FRAMEWORK\Kernel\Core\TError;


/**
 * Use this for $driveInfo = new TDriveInfo;
 *
 * UnEnabled the [ $PDriveInfo = new TDriveInfo; ]
 * to the end of class "TDriveInfo" in file "kernel/coreDisks.php"
 */
use ASCOOS\FRAMEWORK\Kernel\Disks\TDriveInfo;


$user = null; // OR User. If null, in Linux = /home/

// $driveInfo = clone $PDriveInfo; // Create Clone of Class Object Pointer Variable
$driveInfo = new TDriveInfo; // Create Class Object Pointer Variable
try {
   
$driveInfo->setUser($user); // Set user
   
$info = $driveInfo->execute(); // Execute and return Drives data
   
echo "CLASS : ". $driveInfo . "<br>"; // Return namespace = ASCOOS\FRAMEWORK\Kernel\Disks\TDriveInfo
   
echo "PHP VERSION : ".PHP_VERSION."<hr>";


    foreach (
$info as $drive => $sizes) {
        if (
is_array($sizes)) {
            if (
strtoupper(substr(PHP_OS, 0, 3)) === 'WIN')
                echo
"<br><b>Drive $drive </b><br>";
            else
                echo
"<br><b>Directory $drive </b><br>";

            echo
"Total Size: " . $sizes['total'] . "<br>";
            echo
"Used space: " . $sizes['used'] . "<br>";
            echo
"Free space: " . $sizes['free'] . "<br>";
            echo
"<br>";
        } else {
            echo
"<br><b>Drive $drive </b>" . $sizes . "<br>";
        }
    }
} catch (
TError $te) {
    echo
$te;
   
$te->Free($te);
} finally {
    try {
       
$driveInfo->Free($driveInfo); // Free Memory for Clone object
   
} catch (TError $e) {
        echo
"Memory for object <b>[". vn($driveInfo)."]</b> of class <b>[$driveInfo]</b> has not been released" . "<br>";
        echo
$e;
       
$e->Free($e);
    } finally {
        echo
"Memory for object <b>[". vn($driveInfo)."]</b> of class <b>[$driveInfo]</b> have is released" . "<br>";
    }
}

/**
 * Releases memory for master class Object .
 * If use as Cron, then not release memory of the class pointer
 */
//$PDriveInfo->Free($PDriveInfo);

?>


Details

Ascoos Cms

ASCOOS Framework

GitHub Downloads (all assets, all releases) GitHub Release GitHub Release Date GitHub repo size Ascoos Framework 24 - total lines Ascoos Framework 24 - source code lines Ascoos Framework 24 - files in repository

Description

This package is a very small part of the Ascoos Cms custom core for use with PHP 8.2 or later.

Ascoos Cms 24 consists of several core code blocks, one of which is the Ascoos Framework 24, as well as phpBCL.

In older versions, the Ascoos Framework was integrated into the Ascoos Cms core, but in the new version 24 it becomes independent and is now one of the many main components of the Cms core.

In the modern way of programming, the ability of a core code to be modular, gives it the ability to adapt to modern methods and requirements. Ascoos Cms has had this to a large extent in its core since the first releases in the distant 2008. In 2010 it was almost a complete modular core code block. Now, the new version 24 is now coming to create new data in its modular core.

Version 24 only works on PHP 8.2 or later, as the core has been redesigned from the ground up to support modern programming methods and features.

Part of the Ascoos Framework, it is provided as source code to make it easier for Web Developers to understand how to write the extensions they will create for Ascoos Cms.

*

SOURCEFORGE

Download ascoos-framework Download ascoos-framework Download ascoos-framework Download ascoos-framework

Download Ascoos Framework 24'

*

Awards

No Exists now

*

Contributing

Ascoos Cms, of which this Ascoos Framework is a part, contains encrypted source code, but a small part of it is given as source code for educational purposes.

Contributions are welcome github

Feedback

Please send any feedback or suggestions to @ascoos (Twitter) or create an issue on Ascoos Official site.

License

AGL-F

*

Download

OFFICIAL ASCOOS DOWNLOAD SITE Download Ascoos Framework 24 from GitHub Download Ascoos Framework 24 from PHPClasses

*

<br>

Installation and use

  1. Download latest release
  2. Unzip package in your root working directory
  3. Add in index.php or master php file the below code :
$path = '[YOUR SITE PATH]';
include $path . '/afw/autoload.php';

<br>

*

<br>

Ascoos Framework Namespace

    namespace ASCOOS\FRAMEWORK;

use...

    use ASCOOS\FRAMEWORK\Kernel\Core\TObject;

*

<br>

Core File : coreKernel.php

The file contains the basic parent classes of the Ascoos Framework.

Namespace

namespace ASCOOS\FRAMEWORK\Kernel\Core;

| Ascoos<br>Version | TYPE | NAME | DESCRIPTION |--------|-----------|-------------------------|----------------------------------------- | 24.0.0 | Class | TError | Implements the error management class. | 24.0.0 | Interface | TCoreHandler | Stringable Interface Class | 24.0.0 | Class | TObject | The base class on which all classes in the framework are based.

*

<br>

Disks Handler File : coreDisks.php

It contains the implementation of support and management of disks, files, and folders.

Namespace

namespace ASCOOS\FRAMEWORK\Kernel\Disks;

use...

use ASCOOS\FRAMEWORK\Kernel\Disks\TDriveInfo;

| Ascoos<br>Version | TYPE | NAME | DESCRIPTION |-|-|--|- | 24.0.0 | Class | TDriveInfo | Information about Drives, such as size, usable and free space, etc.

*

<br>

Functions File : coreFunctions.php

This file implements several global functions that are either used by other framework code or created for user use.

| Ascoos<br>Version | TYPE | NAME | DESCRIPTION |-|-|--|- | 24.0.0 | Function | formatBytes | Returns the size of bytes in a formatted string e.g. 20.4 KB, 230.2 MB, 20.5 GB, etc. | 24.0.0 | Function | vn | Returns the name of a variable as a string. Otherwise it returns false

*

<br>


  Files folder image Files (54)  
File Role Description
Files folder imageextras (1 file, 1 directory)
Files folder imagekernel (6 files, 1 directory)
Files folder imagelibs (1 file, 1 directory)
Files folder imagetests (1 file)
Files folder imagetools (1 file)
Accessible without login Plain text file autoload.php Aux. Auxiliary script
Plain text file autoloader.php Class Class source
Accessible without login Plain text file CHANGELOG.md Doc. Changelog data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE_AGL-F.md Lic. License text
Accessible without login Plain text file README.md Doc. Documentation

  Files folder image Files (54)  /  extras  
File Role Description
Files folder imagearrays (5 files)
  Accessible without login HTML file index.html Doc. Documentation

  Files folder image Files (54)  /  extras  /  arrays  
File Role Description
  Accessible without login HTML file index.html Doc. Documentation
  Plain text file TArrayAnalysisHandler.php Class Handles advanced data analysis for arrays.
  Plain text file TArrayGraphHandler.php Class Handles the creation of graphical representations from array data
  Plain text file TArrayMongoBSONHandler.php Class Class Mongo BSON Handles
  Plain text file TMessagePack.php Class Class MessagePack Array Handle

  Files folder image Files (54)  /  kernel  
File Role Description
Files folder imageimplementation (3 files)
  Plain text file coreArrays.php Class Class Arrays Handles source
  Plain text file coreDisks.php Class Core Disks Class source
  Plain text file coreFunctions.php Class Core Functions
  Plain text file coreGraphs.php Class Graphs Core Handles
  Plain text file coreKernel.php Class Core Class source
  Accessible without login HTML file index.html Data Empty page

  Files folder image Files (54)  /  kernel  /  implementation  
File Role Description
  Accessible without login HTML file index.html Data Empty page
  Plain text file Methods.php Class Class source
  Plain text file TDriveInfo.php Class Class source

  Files folder image Files (54)  /  libs  
File Role Description
Files folder imagephpBCL8 (4 files, 2 directories)
  Accessible without login HTML file index.html Data Empty page

  Files folder image Files (54)  /  libs  /  phpBCL8  
File Role Description
Files folder imagesrc (3 files, 1 directory)
Files folder imagetest (13 files)
  Accessible without login Plain text file CHANGELOG.md Data Auxiliary data
  Accessible without login HTML file index.html Doc. Documentation
  Accessible without login Plain text file libin.json Data Auxiliary data
  Accessible without login Plain text file phpbcl8_autoload.php Aux. Configuration script

  Files folder image Files (54)  /  libs  /  phpBCL8  /  src  
File Role Description
Files folder imagecompat (10 files)
  Accessible without login Plain text file coreCompatibilities.php Aux. Configuration script
  Accessible without login HTML file index.html Doc. Documentation
  Accessible without login Plain text file phpBCL.php Aux. Configuration script

  Files folder image Files (54)  /  libs  /  phpBCL8  /  src  /  compat  
File Role Description
  Accessible without login Plain text file compat_consts.php Aux. Configuration script
  Accessible without login Plain text file compat_deprecated.php Aux. Configuration script
  Accessible without login Plain text file compat_error.php Aux. Configuration script
  Accessible without login Plain text file compat_php81x.php Aux. Configuration script
  Accessible without login Plain text file compat_php82x.php Example Example script
  Accessible without login Plain text file compat_php83x.php Aux. Configuration script
  Accessible without login Plain text file compat_php84x.php Aux. Configuration script
  Accessible without login Plain text file compat_php85x.php Aux. Configuration script
  Accessible without login Plain text file compat_similar.php Aux. Configuration script
  Accessible without login HTML file index.html Doc. Documentation

  Files folder image Files (54)  /  libs  /  phpBCL8  /  test  
File Role Description
  Accessible without login Plain text file 83__mb_str_pad.php Aux. Configuration script
  Accessible without login Plain text file 84_array_all.php Aux. Configuration script
  Accessible without login Plain text file 84_array_any.php Example Example script
  Accessible without login Plain text file 84_array_find .php Aux. Configuration script
  Accessible without login Plain text file 84_array_find_key.php Aux. Configuration script
  Accessible without login Plain text file 84_bcdivmod.php Aux. Configuration script
  Accessible without login Plain text file 84_grapheme_str_split.php Aux. Configuration script
  Accessible without login Plain text file 84_intltz_get_iana_id.php Aux. Configuration script
  Accessible without login Plain text file 84__http_get_last_response_headers.php Aux. Configuration script
  Accessible without login Plain text file 84__mb_trim.php Aux. Configuration script
  Accessible without login Plain text file 84__mb_ucfirst.php Aux. Configuration script
  Accessible without login Plain text file 85_php_build_date.php Example Example script
  Accessible without login Plain text file example.php Aux. Configuration script

  Files folder image Files (54)  /  tests  
File Role Description
  Accessible without login Plain text file disks_drives.php Example Example script

  Files folder image Files (54)  /  tools  
File Role Description
  Accessible without login HTML file index.html Data Empty page

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Reuses Unique User Downloads Download Rankings  
 100%10
Total:18
This week:7
All time:11,363
This week:10Up