Overview
  • Namespace
  • Class

Namespaces

  • DevStrefa
    • Esemeser

Classes

  • DevStrefa\Esemeser\Esemeser
  • DevStrefa\Esemeser\Message
  • DevStrefa\Esemeser\MessageType
 1 <?php
 2 
 3 namespace DevStrefa\Esemeser;
 4 
 5 /**
 6  * MessageType class
 7  *
 8  * MessageType class is helper class in library, it contains constants for message Types and static function for validation type
 9  *
10  * @license https://opensource.org/licenses/MIT MIT
11  * @author Cichy <d3ut3r@gmail.com>
12  * @version 1.1.0
13  *
14  */
15 
16 
17 class MessageType
18 {
19     const ECO='eco';
20     const STANDARD='standard';
21     const PLUS='plus';
22     const PLUS2='plus2';
23 
24     /**
25      * @param  string $type Message type
26      * @return bool
27      */
28     public static function typeIsValid($type)
29     {
30         if (!in_array($type,array(self::ECO,self::PLUS,self::PLUS2,self::STANDARD)) && $type !== null){
31             return false;
32         }
33 
34         return true;
35     }
36 }
API documentation generated by ApiGen