定制 cmdrsharp/ip-addressing 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

cmdrsharp/ip-addressing

Composer 安装命令:

composer require cmdrsharp/ip-addressing

包简介

A collection of traits for IP Operations.

README 文档

README

Latest Stable Version Build Status StyleCI MIT licensed

A collection of traits for general IP operations. New traits may be added over time.

Current Requirements

  • PHP 7.1 or newer

Installation

Via composer

$ composer require cmdrsharp/ip-addressing

Usage

Use the applicable Trait in your classes.

use CmdrSharp\IpAddressing\IPv4;
use CmdrSharp\IpAddressing\Subnet;

class RandomClass
{
	use IPv4, Subnet;

	protected function randomFunction()
	{
		$result = $this->getNetworkFromIp('192.168.0.55', '255.255.255.0');
		// 192.168.0.0
		
		$result = $this->getBroadcastFromIp('192.168.0.55', '255.255.255.0');
        // 192.168.0.255
		
		$result = $this->getCidrFromNetmask('255.255.255.0');
		// 24
	}
}

What trait contains what?

IPv4

  • getNetworkFromIp(string $ip, string $netmask): string
  • getBroadcastFromIp(string $ip, string $netmask): string

Subnet

  • getCidrFromNetmask(string $netmask): string

Versioning

This package follows Explicit Versioning.

Authors

CmdrSharp

License

The MIT License (MIT)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-08-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固