ride/lib-system 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ride/lib-system

最新稳定版本:1.1.2

Composer 安装命令:

composer require ride/lib-system

包简介

System library of the Ride framework

README 文档

README

System abstraction library of the PHP Ride framework.

What's In This Library

System

The System class in an abstraction of the underlying server system. It offers easy access to the underlying file system. You can also use it to execute commands or check the type of system, the connected client, ...

FileSystem

The FileSystem interface is an abstraction of the underlying file system. A Windows file system is handled different then a Unix file system. This interface makes it possible to program transparantly for both systems.

File

The file system works with File objects. All file operations are to be called through this class.

FileBrowser

The FileBrowser interface is to create a transparant file structure. You can use it to request relative files without knowing how your files are organized. On top of that, you can request the application and the public directory.

PermissionConverter

You can use the PermissionConverter to convert permissions to different formats.

Code Sample

Check this code sample to see the possibilities of this library:

<?php

use ride\library\system\System;

$system = new System();

// check the type of operating system
$system->isUnix();
$system->isWindows();

// check the client
$system->isCli();
$system->getClient(); // ip address or username when in cli

// execute a command
$output = $system->execute('whoami');

// file system abstraction
$fileSystem = $system->getFileSystem();

$dir = $fileSystem->getFile('/path/to/dir');
$dir->isDirectory();
$dir->isReadable();
$files = $dir->read();

$file = $fileSystem->getFile('/path/to/file');
$file->exists();
$file->getModificationTime();
$file->setLock(true);
$content = $file->read();

$destination = $dir->getChild($file->getName());
$destination = $destination->getCopyFile();

$file->copy($destination);

Implementations

For more examples, you can check the following implementation of this library:

Installation

You can use Composer to install this library.

composer require ride/lib-system

统计信息

  • 总下载量: 6.18k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 46
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 9
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2014-02-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固