PHP Classes

File: tests/resources/generated/ValidApiSourceType.php

Recommend this page to a friend!
  Classes of WsdlToPhp   PHP SOAP Package Generator   tests/resources/generated/ValidApiSourceType.php   Download  
File: tests/resources/generated/ValidApiSourceType.php
Role: Unit test script
Content type: text/plain
Description: Unit test script
Class: PHP SOAP Package Generator
Generate package to call SOAP services using WSDL
Author: By
Last change: issue-35 - fix #35: allow property value to be null
when value should be an enumeration value
Date: 8 years ago
Size: 3,639 bytes
 

Contents

Class file image Download
<?php

namespace Api\EnumType;

/**
 * This class stands for SourceType EnumType
 * @package Api
 * @subpackage Enumerations
 * @release 1.1.0
 */
class ApiSourceType
{
   
/**
     * Constant for value 'Spell'
     * @return string 'Spell'
     */
   
const VALUE_SPELL = 'Spell';
   
/**
     * Constant for value 'Web'
     * @return string 'Web'
     */
   
const VALUE_WEB = 'Web';
   
/**
     * Constant for value 'Image'
     * @return string 'Image'
     */
   
const VALUE_IMAGE = 'Image';
   
/**
     * Constant for value 'RelatedSearch'
     * @return string 'RelatedSearch'
     */
   
const VALUE_RELATEDSEARCH = 'RelatedSearch';
   
/**
     * Constant for value 'Phonebook'
     * @return string 'Phonebook'
     */
   
const VALUE_PHONEBOOK = 'Phonebook';
   
/**
     * Constant for value 'Showtimes'
     * @return string 'Showtimes'
     */
   
const VALUE_SHOWTIMES = 'Showtimes';
   
/**
     * Constant for value 'Weather'
     * @return string 'Weather'
     */
   
const VALUE_WEATHER = 'Weather';
   
/**
     * Constant for value 'Video'
     * @return string 'Video'
     */
   
const VALUE_VIDEO = 'Video';
   
/**
     * Constant for value 'Ad'
     * @return string 'Ad'
     */
   
const VALUE_AD = 'Ad';
   
/**
     * Constant for value 'XRank'
     * @return string 'XRank'
     */
   
const VALUE_XRANK = 'XRank';
   
/**
     * Constant for value 'InstantAnswer'
     * @return string 'InstantAnswer'
     */
   
const VALUE_INSTANTANSWER = 'InstantAnswer';
   
/**
     * Constant for value 'News'
     * @return string 'News'
     */
   
const VALUE_NEWS = 'News';
   
/**
     * Constant for value 'QueryLocation'
     * @return string 'QueryLocation'
     */
   
const VALUE_QUERYLOCATION = 'QueryLocation';
   
/**
     * Constant for value 'MobileWeb'
     * @return string 'MobileWeb'
     */
   
const VALUE_MOBILEWEB = 'MobileWeb';
   
/**
     * Constant for value 'Translation'
     * @return string 'Translation'
     */
   
const VALUE_TRANSLATION = 'Translation';
   
/**
     * Return true if value is allowed
     * @uses self::getValidValues()
     * @param mixed $value value
     * @return bool true|false
     */
   
public static function valueIsValid($value)
    {
        return (
$value === null) || in_array($value, self::getValidValues(), true);
    }
   
/**
     * Return allowed values
     * @uses self::VALUE_SPELL
     * @uses self::VALUE_WEB
     * @uses self::VALUE_IMAGE
     * @uses self::VALUE_RELATEDSEARCH
     * @uses self::VALUE_PHONEBOOK
     * @uses self::VALUE_SHOWTIMES
     * @uses self::VALUE_WEATHER
     * @uses self::VALUE_VIDEO
     * @uses self::VALUE_AD
     * @uses self::VALUE_XRANK
     * @uses self::VALUE_INSTANTANSWER
     * @uses self::VALUE_NEWS
     * @uses self::VALUE_QUERYLOCATION
     * @uses self::VALUE_MOBILEWEB
     * @uses self::VALUE_TRANSLATION
     * @return string[]
     */
   
public static function getValidValues()
    {
        return array(
           
self::VALUE_SPELL,
           
self::VALUE_WEB,
           
self::VALUE_IMAGE,
           
self::VALUE_RELATEDSEARCH,
           
self::VALUE_PHONEBOOK,
           
self::VALUE_SHOWTIMES,
           
self::VALUE_WEATHER,
           
self::VALUE_VIDEO,
           
self::VALUE_AD,
           
self::VALUE_XRANK,
           
self::VALUE_INSTANTANSWER,
           
self::VALUE_NEWS,
           
self::VALUE_QUERYLOCATION,
           
self::VALUE_MOBILEWEB,
           
self::VALUE_TRANSLATION,
        );
    }
   
/**
     * Method returning the class name
     * @return string __CLASS__
     */
   
public function __toString()
    {
        return
__CLASS__;
    }
}