Warning: chmod(): Operation not permitted in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8 [0] in function chmod in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8 [1] in function include_once in /var/www/hopeinstoughton_www/wp-settings.php on line 560 [2] in function require_once in /var/www/hopeinstoughton_www/wp-config.php on line 85 [3] in function require_once in /var/www/hopeinstoughton_www/wp-load.php on line 50 [4] in function require_once in /var/www/hopeinstoughton_www/wp-blog-header.php on line 13 [5] in function require in /var/www/hopeinstoughton_www/index.php on line 17
| Server IP : 94.177.8.99 / Your IP : 216.73.217.165 Web Server : Apache/2.4.58 (Ubuntu) System : Linux aries 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64 User : www-data ( 33) PHP Version : 8.1.34 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/hopeinstoughton_www/vendor/microsoft/microsoft-graph/src/Core/ |
Upload File : |
<?php
/**
* Copyright (c) Microsoft Corporation. All Rights Reserved.
* Licensed under the MIT License. See License in the project root
* for license information.
*
* Enum File
* PHP version 7
*
* @category Library
* @package Microsoft.Graph
* @copyright 2016 Microsoft Corporation
* @license https://opensource.org/licenses/MIT MIT License
* @version GIT: 0.1.0
* @link https://graph.microsoft.io/
*/
namespace Microsoft\Graph\Core;
use Microsoft\Graph\Exception\GraphException;
/**
* Class Enum
*
* @category Library
* @package Microsoft.Graph
* @license https://opensource.org/licenses/MIT MIT License
* @link https://graph.microsoft.io/
*/
abstract class Enum
{
private static $constants = [];
/**
* The value of the enum
*
* @var string
*/
private $_value;
/**
* Create a new enum
*
* @param string $value The value of the enum
*
* @throws GraphException if enum value is invalid
*/
public function __construct($value)
{
if (!self::has($value)) {
throw new GraphException("Invalid enum value $value");
}
$this->_value = $value;
}
/**
* Check if the enum has the given value
*
* @param string $value
* @return bool the enum has the value
*/
public function has($value)
{
return in_array($value, self::toArray(), true);
}
/**
* Check if the enum is defined
*
* @param string $value the value of the enum
*
* @return bool True if the value is defined
*/
public function is($value)
{
return $this->_value === $value;
}
/**
* Create a new class for the enum in question
*
* @return mixed
* @throws \ReflectionException
*/
public function toArray()
{
$class = get_called_class();
if (!(array_key_exists($class, self::$constants)))
{
$reflectionObj = new \ReflectionClass($class);
self::$constants[$class] = $reflectionObj->getConstants();
}
return self::$constants[$class];
}
/**
* Get the value of the enum
*
* @return string value of the enum
*/
public function value()
{
return $this->_value;
}
}