2017 © Pedro Peláez
 

library is-php

this labrary is is.js inspired Library for php

image

webuilder240/is-php

this labrary is is.js inspired Library for php

  • Friday, August 7, 2015
  • by oh240
  • Repository
  • 2 Watchers
  • 1 Stars
  • 10 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 6 Versions
  • 0 % Grown

The README.md

is.php 0.0.5

[Code Coverage](https://scrutinizer-ci.com/g/webuilder240/is.php/?branch=master) Latest Stable Version Build Status, (*1)

Usage:

``` bash composer require webuilder240/is-php, (*2)


# Web Server Check: ## Is\Is::apache() ``` php Is\Is::apache(); // true if current run server is apache

Is\Is::build_in_server()

``` php, (*3)

Is\Is::build_in_server(); // true if current run server is php build_in_server(cli-server), (*4)


# Server Check: ## Is\Is::ssl() ``` php Is\Is::ssl(); // true if current run server protocol is 'ssl'

Is\Is::localhost()

``` php, (*5)

Is\Is::localhost(); // true if current run server ip is 'localhost' or 127.0.0.1, (*6)


## Is\Is::host(value:string) ``` php Is\Is::host('www.google.com'); // true if current run server host name is 'www.google.com'

Is\Is::host_ip(value:string)

``` php, (*7)

Is\Is::host_ip('192.168.56.101'); // true if current run server host ip address '192.168.56.101', (*8)


# UserAgent Check ## Is\Is::chrome() ``` php Is\Is::chorme(); // true if current browser is chrome

Is\Is::firefox()

``` php, (*9)

Is\Is::firefox(); // true if current browser is firefox, (*10)


## Is\Is::safari() ``` php Is\Is::safari(); // true if current browser is safari

Is\Is::opera()

``` php, (*11)

Is\Is::opera(); // true if current browser is opera, (*12)


## Is\Is::ie(version:int) ``` php Is\Is::ie(); // true if current browser is ie Is\Is::ie(8); // true if current brower is ie version 8

Is\Is::ios()

``` php, (*13)

Is\Is::ios(); // true if current device has iOS, (*14)


## Is\Is::android(); ``` php Is\Is::android(); // true if current device has Android OS

Is\Is::mobile() [phone]

``` php, (*15)

Is\Is::mobile(); // true if current device is mobile (phone), (*16)


## Is\Is::tablet() ``` php Is\Is::tablet(); // true if current device is tablet

HttpMethod Check

Is\Is::request_get()

``` php, (*17)

Is\Is::request_get(); // true if current request is GET request, (*18)


## Is\Is::request_post() ``` php Is\Is::request_post(); // true if current request is POST request

Is\Is::request_put()

``` php, (*19)

Is\Is::request_put(); // true if current request is PUT request, (*20)


## Is\Is::request_patch() ``` php Is\Is::request_patch(); // true if current request is PATCH request

Is\Is::request_delete()

``` php, (*21)

Is\Is::request_delete(); // true if current request is DELETE request, (*22)


## Is\Is::http_status_code(uri:string,http_code:int) ``` php Is\Is::http_status_code('http://google.com',302); // true if http://google.com is responsed http_status_code 302

TypeCheck

Is\Is::same_type(val:any,val:any)

``` php, (*23)

Is\Is::same_type(1,2); // true, (*24)

Is\Is::same_type('1',2); // false, (*25)


# String Check ## Is\Is::str_include(str:string,search_word:string) ``` php Is\Is::str_include('nick','n'); // true Is\Is::str_include('test','text); // false

The Versions

07/08 2015

dev-master

9999999-dev

this labrary is is.js inspired Library for php

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Nishio Takuya

01/08 2015

0.0.5

0.0.5.0

this labrary is is.js inspired Library for php

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Nishio Takuya

01/08 2015

0.0.4

0.0.4.0

this labrary is is.js inspired Library for php

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Nishio Takuya

28/07 2015

0.0.3

0.0.3.0

this labrary is is.js inspired Library for php

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Nishio Takuya

26/07 2015

0.0.2

0.0.2.0

this labrary is is.js inspired Library for php

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Nishio Takuya

25/07 2015

0.0.1

0.0.1.0

this labrary is is.js inspired Library for php

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

by Nishio Takuya