PHP Class WsdlToPhp\PackageGenerator\Generator\Utils

Datei anzeigen Open project: wsdltophp/packagegenerator Class Usage Examples

Public Methods

Method Description
cleanComment ( string $comment, string $glueSeparator = ',', boolean $uniqueValues = true ) : string Clean comment
cleanString ( string $string, boolean $keepMultipleUnderscores = true ) : string Clean a string to make it valid as PHP variable See more about the used regular expression at {@link http://www.regular-expressions.info/unicode.html}: - \p{L} for any valid letter - \p{N} for any valid number - /u for suporting unicode
createDirectory ( string $directory, integer $permissions = 509 ) : boolean
getContentFromUrl ( string $url, string $basicAuthLogin = null, string $basicAuthPassword = null, string $proxyHost = null, string $proxyPort = null, string $proxyLogin = null, string $proxyPassword = null, array $contextOptions = [] ) : string Get content from url using a proxy or not
getContentFromUrlContextOptions ( string $url, string $basicAuthLogin = null, string $basicAuthPassword = null, string $proxyHost = null, string $proxyPort = null, string $proxyLogin = null, string $proxyPassword = null, array $contextOptions = [] ) : string[]
getPart ( string $optionValue, string $string ) : string Gets upper case word admong a string from the end or from the beginning part
getValueWithinItsType ( mixed $value, $knownType = null ) : mixed Returns the value with good type
removeNamespace ( string $namespacedClassName ) : string
resolveCompletePath ( string $origin, string $destination ) : string

Method Details

cleanComment() public static method

Clean comment
public static cleanComment ( string $comment, string $glueSeparator = ',', boolean $uniqueValues = true ) : string
$comment string the comment to clean
$glueSeparator string ths string to use when gathering values
$uniqueValues boolean indicates if comment values must be unique or not
return string

cleanString() public static method

Clean a string to make it valid as PHP variable See more about the used regular expression at {@link http://www.regular-expressions.info/unicode.html}: - \p{L} for any valid letter - \p{N} for any valid number - /u for suporting unicode
public static cleanString ( string $string, boolean $keepMultipleUnderscores = true ) : string
$string string the string to clean
$keepMultipleUnderscores boolean optional, allows to keep the multiple consecutive underscores
return string

createDirectory() public static method

public static createDirectory ( string $directory, integer $permissions = 509 ) : boolean
$directory string
$permissions integer
return boolean

getContentFromUrl() public static method

Get content from url using a proxy or not
public static getContentFromUrl ( string $url, string $basicAuthLogin = null, string $basicAuthPassword = null, string $proxyHost = null, string $proxyPort = null, string $proxyLogin = null, string $proxyPassword = null, array $contextOptions = [] ) : string
$url string
$basicAuthLogin string
$basicAuthPassword string
$proxyHost string
$proxyPort string
$proxyLogin string
$proxyPassword string
$contextOptions array
return string

getContentFromUrlContextOptions() public static method

public static getContentFromUrlContextOptions ( string $url, string $basicAuthLogin = null, string $basicAuthPassword = null, string $proxyHost = null, string $proxyPort = null, string $proxyLogin = null, string $proxyPassword = null, array $contextOptions = [] ) : string[]
$url string
$basicAuthLogin string
$basicAuthPassword string
$proxyHost string
$proxyPort string
$proxyLogin string
$proxyPassword string
$contextOptions array
return string[]

getPart() public static method

Gets upper case word admong a string from the end or from the beginning part
public static getPart ( string $optionValue, string $string ) : string
$optionValue string
$string string the string from which we can extract the part
return string

getValueWithinItsType() public static method

Returns the value with good type
public static getValueWithinItsType ( mixed $value, $knownType = null ) : mixed
$value mixed the value
return mixed

removeNamespace() public static method

public static removeNamespace ( string $namespacedClassName ) : string
$namespacedClassName string
return string

resolveCompletePath() public static method

public static resolveCompletePath ( string $origin, string $destination ) : string
$origin string
$destination string
return string