Welcome to JPHP’s documentation!

API (English)

php - The general namespace of JPHP’s Standart Library.

BaseException

class BaseException

abstract class

extends: Exception

Children


EngineException

class EngineException

extends: BaseException

Methods


EngineException::getErrorType()
Результат:int

ParseException

class ParseException

extends: BaseException

php

android

Android
php\android\Android

Class Android

Methods


static startActivity($class)
Параметры:
  • $classstring
app
Activity
php\android\app\Activity

Methods


__construct()
setContentView($view)
Параметры:
getContentView()
Результат:php\android\view\View
setTitle($title)
Параметры:
  • $titlestring
findViewById($id)
Параметры:
  • $idint
Результат:

php\android\view\View

isChild()
Результат:bool
getParent()
Результат:php\android\app\Activity
onCreate()
Application
php\android\app\Application

Class Application

BootstrapActivity
php\android\app\BootstrapActivity

extends: php\android\app\Activity

The general launcher activity must be inherited by this class.

Class BootstrapActivity

R
php\android\R

final class

Methods


__construct()

private

static id($name)
Параметры:
  • $namestring
Результат:

int

static string($name)
Параметры:
  • $name
Результат:

int

text
InputType
php\android\text\InputType

Constants


constant TYPE_MASK_CLASS
constant TYPE_MASK_VARIATION
constant TYPE_MASK_FLAGS
constant TYPE_NULL
constant TYPE_CLASS_TEXT
constant TYPE_TEXT_FLAG_CAP_CHARACTERS
constant TYPE_TEXT_FLAG_CAP_WORDS
constant TYPE_TEXT_FLAG_CAP_SENTENCES
constant TYPE_TEXT_FLAG_AUTO_CORRECT
constant TYPE_TEXT_FLAG_AUTO_COMPLETE
constant TYPE_TEXT_FLAG_MULTI_LINE
constant TYPE_TEXT_FLAG_IME_MULTI_LINE
constant TYPE_TEXT_FLAG_NO_SUGGESTIONS
constant TYPE_TEXT_VARIATION_NORMAL
constant TYPE_TEXT_VARIATION_URI
constant TYPE_TEXT_VARIATION_EMAIL_ADDRESS
constant TYPE_TEXT_VARIATION_EMAIL_SUBJECT
constant TYPE_TEXT_VARIATION_SHORT_MESSAGE
constant TYPE_TEXT_VARIATION_LONG_MESSAGE
constant TYPE_TEXT_VARIATION_PERSON_NAME
constant TYPE_TEXT_VARIATION_POSTAL_ADDRESS
constant TYPE_TEXT_VARIATION_PASSWORD
constant TYPE_TEXT_VARIATION_VISIBLE_PASSWORD
constant TYPE_TEXT_VARIATION_WEB_EDIT_TEXT
constant TYPE_TEXT_VARIATION_FILTER
constant TYPE_TEXT_VARIATION_PHONETIC
constant TYPE_TEXT_VARIATION_WEB_EMAIL_ADDRESS
constant TYPE_TEXT_VARIATION_WEB_PASSWORD
constant TYPE_CLASS_NUMBER
constant TYPE_NUMBER_FLAG_SIGNED
constant TYPE_NUMBER_FLAG_DECIMAL
constant TYPE_NUMBER_VARIATION_NORMAL
constant TYPE_NUMBER_VARIATION_PASSWORD
constant TYPE_CLASS_PHONE
constant TYPE_CLASS_DATETIME
constant TYPE_DATETIME_VARIATION_NORMAL
constant TYPE_DATETIME_VARIATION_DATE
constant TYPE_DATETIME_VARIATION_TIME
view
View
php\android\view\View

Methods


__construct($context)
Параметры:
on($event, $callback)
Параметры:
  • $eventstring
  • $callbackcallable
off($event)
Параметры:
  • $eventstring
trigger($event)
Параметры:
  • $eventstring
ViewGroup
php\android\view\ViewGroup

extends: php\android\view\View

Children


Methods


addView($view, $indexOrWidth, $height)
Параметры:
widget
Button
php\android\widget\Button

extends: php\android\widget\TextView

Class Button

EditText
php\android\widget\EditText

extends: php\android\widget\TextView

Class EditText

FrameLayout
php\android\widget\FrameLayout

extends: php\android\view\ViewGroup

Class FrameLayout

ImageView
php\android\widget\ImageView

extends: php\android\view\View

Methods


setImageAsset($fileName)

Loads image from assets.

throws php\io\IOException

Параметры:
  • $fileNamestring
LinearLayout
php\android\widget\LinearLayout

extends: php\android\view\ViewGroup

Class LinearLayout

RelativeLayout
php\android\widget\RelativeLayout

extends: php\android\view\ViewGroup

Class LinearLayout

TextView
php\android\widget\TextView

extends: php\android\view\View

Children


Methods


setText($text)
Параметры:
  • $textstring
getText()
Результат:string
setInputType($type)
Параметры:
  • $typeint - see phpandroidtextInputType constants
getInputType()
Результат:int
Toast
php\android\widget\Toast

Class Toast

Constants


constant LENGTH_SHORT
constant LENGTH_LONG

Methods


show()
cancel()
setText($text)
Параметры:
  • $textstring
setDuration($duration)
Параметры:
  • $durationint
getDuration()
Результат:int
static makeText($text, $duration = ::)

Show text

Параметры:
  • $textstring
  • $durationint
Результат:

php\android\widget\Toast

compress

ArchiveEntry
php\compress\ArchiveEntry

jphp-compress-ext

Class ArchiveEntry

Methods


getName()
Результат:string
isDirectory()
Результат:bool
getSize()
Результат:int
setSize($size)
Параметры:
  • $sizeint
getLastModifiedDate()
Результат:int
ArchiveInputStream
php\compress\ArchiveInputStream

extends: php\io\MiscStream

jphp-compress-ext

Class ArchiveInputStream for reading archive

Methods


__construct($format, $source)
Параметры:
nextEntry()
Результат:php\compress\ArchiveEntry
ArchiveOutputStream
php\compress\ArchiveOutputStream

extends: php\io\MiscStream

jphp-compress-ext

Class ArchiveOutputStream for creating archives

Methods


__construct($format, $source)
Параметры:
createEntry($file, $name)
Параметры:
  • $filestring
  • $namestring
Результат:

php\compress\ArchiveEntry

addFile($file, $name)
Параметры:
  • $filestring
  • $namestring
Результат:

php\compress\ArchiveEntry

addEntry($entry)
Параметры:
canAddEntry($entry)
Параметры:
closeEntry()

concurrent

Future
php\concurrent\Future

Class Future

Methods


__construct()

private

isCancelled()
Результат:bool
isDone()
Результат:bool
cancel($mayInterruptIfRunning)
Параметры:
  • $mayInterruptIfRunningbool
Результат:

bool

get($timeout = null)

throws php\concurrent\\Exception

Параметры:
  • $timeoutnull, int - - in milliseconds
Результат:

mixed

TimeoutException
php\concurrent\TimeoutException

extends: php\lang\JavaException

Class TimeoutException

format

JsonProcessor
php\format\JsonProcessor

extends: php\format\Processor

Class JsonProcessor

Constants


constant SERIALIZE_PRETTY_PRINT
constant DESERIALIZE_AS_ARRAYS

Methods


__construct($flags = 0)
Параметры:
  • $flagsint
parse($json)

throws php\format\ProcessorException

Параметры:
Результат:

mixed

format($value)

throws php\format\ProcessorException

Параметры:
  • $valuemixed
Результат:

string

formatTo($value, $output)

throws php\format\ProcessorException

Параметры:
onSerialize($nameOfType, $handler = null)
Параметры:
  • $nameOfTypestring - - null, int, float, string, bool, object, array
  • $handlercallable - (mixed $value) -> mixed
onClassSerialize($className, $handler = null)
Параметры:
  • $classNamestring
  • $handlercallable
Processor
php\format\Processor

abstract class

Children


Methods


format($value)

abstract

Параметры:
  • $value
formatTo($value, $output)

abstract

Параметры:
parse($string)

abstract

Параметры:
  • $string
ProcessorException
php\format\ProcessorException

extends: Exception

Class ProcessorException

gdx

Application
php\gdx\Application

abstract class

Children


Constants


constant LOG_NONE
constant LOG_DEBUG
constant LOG_INFO
constant LOG_ERROR

Methods


getGraphics()
Результат:php\gdx\Graphics
getFiles()
Результат:php\gdx\Files
getInput()
Результат:php\gdx\Input
getAudio()
Результат:php\gdx\Audio
log($tag, $message)
Параметры:
  • $tagstring
  • $messagestring
error($tag, $message)
Параметры:
  • $tagstring
  • $messagestring
debug($tag, $message)
Параметры:
  • $tagstring
  • $messagestring
setLogLevel($level)
Параметры:
  • $levelint
getLogLevel()
Результат:int
getType()
Результат:string - Android, Desktop, HeadlessDesktop, Applet, WebGL, iOS
getVersion()
Результат:int the Android API level on Android, the major OS version on iOS (5, 6, 7, ..), or 0 on the desktop.
getJavaHeap()
Результат:int the Java heap memory use in bytes
getNativeHeap()
Результат:int the Native heap memory use in bytes
halt()
getClipboard()
Результат:php\gdx\Clipboard
ApplicationListener
php\gdx\ApplicationListener

Methods


create()
resize($width, $height)
Параметры:
  • $width
  • $height
render()
pause()
resume()
dispose()
assets
AssetManager
php\gdx\assets\AssetManager

Methods


__construct($resolver)
Параметры:
  • $resolvercallable - (optional) - function($fileName): FileHandle
get($fileName)
Параметры:
  • $fileNamestring
Результат:

php\gdx\graphics\Texture, php\gdx\graphics\Pixmap, php\gdx\audio\Music, php\gdx\audio\Sound

loadTexture($fileName)
Параметры:
  • $fileNamestring
loadPixmap($fileName)
Параметры:
  • $fileNamestring
loadMusic($fileName)
Параметры:
  • $fileNamestring
loadSound($fileName)
Параметры:
  • $fileNamestring
unload($fileName)
Параметры:
  • $fileNamestring
isLoaded($fileName)
Параметры:
  • $fileNamestring
containsAsset($asset)
Параметры:
  • $assetobject, mixed
getAssetFileName($asset)
Параметры:
  • $assetobject, mixed
disposeDependencies($fileName)
Параметры:
  • $fileNamestring
update($millis)
Параметры:
  • $millisint - (optional)
finishLoading()
getLoadedAssets()
Результат:int
getQueuedAssets()
Результат:int
getProgress()
Результат:float
dispose()
clear()
getReferenceCount($fileName)
Параметры:
  • $fileNamestring
Результат:

int

setReferenceCount($fileName, $refCount)
Параметры:
  • $fileNamestring
  • $refCountint
getDiagnostics()
Результат:string
audio
AudioDevice
php\gdx\audio\AudioDevice

Class AudioDevice

Methods


__construct()

private

isMono()
Результат:bool
writeSamples($samples, $offset, $numSamples)

Writes the array of 16-bit signed PCM samples to the audio device and blocks until they have been processed.

Параметры:
  • $samplesarray
  • $offsetint
  • $numSamplesint
writeFloatSamples($samples, $offset, $numSamples)

Writes the array of float PCM samples to the audio device and blocks until they have been processed.

Параметры:
  • $samplesarray
  • $offsetint
  • $numSamplesint
getLatency()
Результат:int
dispose()
setVolume($volume)

Sets the volume in the range [0,1].

Параметры:
  • $volumedouble
AudioRecorder
php\gdx\audio\AudioRecorder

Class AudioRecorder

Methods


__construct()

private

read($samples, $offset, $numSamples)

Reads in numSamples samples into the array samples starting at offset. If the recorder is in stereo you have to multiply numSamples by 2.

Параметры:
  • $samplesarray
  • $offsetint
  • $numSamplesint
dispose()
Music
php\gdx\audio\Music

Class Music

Methods


__construct()

private

play()
pause()
stop()
isPlaying()
Результат:bool whether this music stream is playing
setLooping($isLooping)
Параметры:
  • $isLoopingbool
isLooping()
Результат:bool
setVolume($volume)
Параметры:
  • $volumedouble
getVolume()
Результат:double
setPan($pan, $volume)

Sets the panning and volume of this music stream.

Параметры:
  • $pandouble - panning in the range -1 (full left) to 1 (full right). 0 is center position.
  • $volumedouble
getPosition()

Returns the playback position in milliseconds.

Результат:double
dispose()
setOnCompletionListener($listener)

Register a callback to be invoked when the end of a music stream has been reached during playback.

Параметры:
  • $listenercallable - (Music $music)
Sound
php\gdx\audio\Sound

Class Sound

Methods


__construct()

private

play($volume, $pitch, $pan)

Plays the sound. If the sound is already playing, it will be played again, concurrently.

Параметры:
  • $volumedouble - (optional)
  • $pitchdouble - (optional)
  • $pandouble - (optional)
Результат:

int the id of the sound instance if successful, or -1 on failure.

loop($volume, $pitch, $pan)

Plays the sound, looping. If the sound is already playing, it will be played again, concurrently. You need to stop the sound via a call to stop(long) using the returned id.

Параметры:
  • $volumedouble - (optional)
  • $pitchdouble - (optional)
  • $pandouble - (optional)
Результат:

int the id of the sound instance if successful, or -1 on failure.

stop($soundId)

Stops playing all or $soundId instance(s) of this sound.

Параметры:
  • $soundIdint - (optional)
pause($soundId)

Pauses the sound instance with the given id as returned by play() or all sounds. If the sound is no longer playing, this has no effect.

Параметры:
  • $soundIdint - (optional)
resume($soundId)
Параметры:
  • $soundIdint - (optional)
setLooping($soundId, $looping)

Sets the sound instance with the given id to be looping. If the sound is no longer playing this has no effect

Параметры:
  • $soundIdint
  • $loopingbool
setPitch($soundId, $pitch)

Changes the pitch multiplier of the sound instance with the given id as returned by play(). If the sound is no longer playing, this has no effect.

Параметры:
  • $soundIdint
  • $pitchfloat
setPan($soundId, $pan, $volume)

Sets the panning and volume of the sound instance with the given id as returned by play(). If the sound is no longer playing, this has no effect.

Параметры:
  • $soundIdint
  • $panfloat
  • $volumefloat
setPriority($soundId, $priority)

Sets the priority of a sound currently being played back. Higher priority sounds will be considered last if the maximum number of concurrently playing sounds is exceeded. This is only a hint and might not be honored by a backend implementation.

Параметры:
  • $soundIdint
  • $priorityint - the priority (0 == lowest)
dispose()
Audio
php\gdx\Audio

Class Audio

Methods


__construct()

private

newAudioDevice($samplingRate, $isMono)

Creates a new AudioDevice either in mono or stereo mode. The AudioDevice has to be disposed via its AudioDevice->dispose() method when it is no longer used.

throws php\gdx\GdxRuntimeException in case the device could not be created

Параметры:
  • $samplingRateint
  • $isMonoboolean
Результат:

php\gdx\audio\AudioDevice

newAudioRecorder($samplingRate, $isMono)

Creates a new AudioRecorder. The AudioRecorder has to be disposed after it is no longer used.

throws php\gdx\GdxRuntimeException in case the recorder could not be created

Параметры:
  • $samplingRateint
  • $isMonobool
Результат:

php\gdx\audio\AudioRecorder

newSound($fileHandle)

Creates a new Sound which is used to play back audio effects such as gun shots or explosions. The Sound’s audio data is retrieved from the file specified via the FileHandle. Note that the complete audio data is loaded into RAM. You should therefore not load big audio files with this methods. The current upper limit for decoded audio is 1 MB.

Currently supported formats are WAV, MP3 and OGG.

The Sound has to be disposed if it is no longer used via the {@link Sound#dispose()} method.

throws php\gdx\GdxRuntimeException in case the sound could not be loaded

Параметры:
Результат:

php\gdx\audio\Sound

newMusic($fileHandle)

Creates a new Music instance which is used to play back a music stream from a file. Currently supported formats are WAV, MP3 and OGG. The Music instance has to be disposed if it is no longer used via the Music->dispose() method. Music instances are automatically paused when ApplicationListener->pause() is called and resumed when ApplicationListener->resume() is called.

throws php\gdx\GdxRuntimeException in case the music could not be loaded

Параметры:
Результат:

php\gdx\audio\Music

Clipboard
php\gdx\Clipboard

Class Clipboard

Methods


__construct()

private

getContent()

gets the current content of the clipboard if it contains text

Результат:string the clipboard content or null
setContent($content)

Sets the content of the system clipboard.

Параметры:
  • $contentstring
files
FileHandle
php\gdx\files\FileHandle

Class FileHandle

Methods


__construct($path)
Параметры:
path()
Результат:string
name()
Результат:string
extension()
Результат:string
nameWithoutExtension()
Результат:string
pathWithoutExtension()
Результат:string
type()
Результат:string
file()
Результат:php\io\File
read()
Результат:php\io\Stream
readString($charset)
Параметры:
  • $charsetstring - (optional)
Результат:

string

readBytes()
Результат:string binary
write($append, $bufferSize)
Параметры:
  • $appendbool
  • $bufferSizeint - (optional)
Результат:

php\io\Stream

writeString($string, $append, $charset)
Параметры:
  • $stringstring
  • $appendbool
  • $charsetstring - (optional)
writeBytes($binaryString, $append)
Параметры:
  • $binaryStringstring
  • $appendbool
getList($suffix)
Параметры:
  • $suffixstring - (optional)
Результат:

php\gdx\files\FileHandle[]

isDirectory()
Результат:bool
child($name)
Параметры:
  • $namestring
Результат:

php\gdx\files\FileHandle

sibling($name)
Параметры:
  • $name
Результат:

php\gdx\files\FileHandle

parent()
Результат:php\gdx\files\FileHandle
mkdirs()

throws php\gdx\files\\Exception

exists()
Результат:bool
delete()
Результат:bool
deleteDirectory()
Результат:bool
emptyDirectory($preserveTree)
Параметры:
  • $preserveTreebool - (optional)
copyTo($fileHandle)
Параметры:
moveTo($fileHandle)
Параметры:
length()
Результат:int
lastModified()
Результат:int
static tempFile($suffix)
Параметры:
  • $suffixstring
Результат:

php\gdx\files\FileHandle

static tempDirectory($suffix)
Параметры:
  • $suffixstring
Результат:

php\gdx\files\FileHandle

Files
php\gdx\Files

Class Files

Methods


getFileHandle($path, $type)
Параметры:
  • $pathstring
  • $typestring - - Classpath, Internal, External, Absolute, Local
Результат:

php\gdx\files\FileHandle

classpath($path)
Параметры:
  • $pathstring
Результат:

php\gdx\files\FileHandle

internal($path)
Параметры:
  • $path
Результат:

php\gdx\files\FileHandle

external($path)
Параметры:
  • $path
Результат:

php\gdx\files\FileHandle

absolute($path)
Параметры:
  • $path
Результат:

php\gdx\files\FileHandle

local($path)
Параметры:
  • $path
Результат:

php\gdx\files\FileHandle

getExternalStoragePath()
Результат:string
isExternalStorageAvailable()
Результат:bool
getLocalStoragePath()
Результат:string
isLocalStorageAvailable()
Результат:string
Gdx
php\gdx\Gdx

Methods


static app
Результат:php\gdx\Application
static files
Результат:php\gdx\Files
static graphics
Результат:php\gdx\Graphics
static input
Результат:php\gdx\Input
static audio
Результат:php\gdx\Audio
GdxRuntimeException
php\gdx\GdxRuntimeException
graphics
Batch
php\gdx\graphics\Batch

Methods


begin()
end()
DisplayMode
php\gdx\graphics\DisplayMode

Class DisplayMode

Methods


__construct()

private

getWidth()
Результат:int
getHeight()
Результат:int
getBitsPerPixel()
Результат:int
getRefreshRate()
Результат:int
__toString()
Результат:string
Pixmap
php\gdx\graphics\Pixmap

Class Pixmap

Methods


__construct($width, $height, $format)
Параметры:
  • $widthint
  • $heightint
  • $formatstring - - Alpha, Intensity, LuminanceAlpha, RGB565, RGBA4444, RGB888, RGBA8888
static ofFile($fileHandle)
Параметры:
Результат:

string

setColor($redOrColor, $g, $b, $a)
Параметры:
  • $redOrColordouble, int
  • $gdouble - (optional)
  • $bdouble - (optional)
  • $adouble - (optional)
fill()
drawLine($x, $y, $x2, $y2)
Параметры:
  • $xint
  • $yint
  • $x2int
  • $y2int
drawRectangle($x, $y, $width, $height)
Параметры:
  • $xint
  • $yint
  • $widthint
  • $heightint
drawPixmap($pixmap, $x, $y, $srcx, $srcy, $srcWidth, $srcHeight)
Параметры:
  • $pixmapphp\gdx\graphics\Pixmap
  • $xint
  • $yint
  • $srcxint - (optional)
  • $srcyint - (optional)
  • $srcWidthint - (optional)
  • $srcHeightint - (optional)
fillRectangle($x, $y, $width, $height)
Параметры:
  • $xint
  • $yint
  • $widthint
  • $heightint
drawCircle($x, $y, $radius)
Параметры:
  • $xint
  • $yint
  • $radiusint
fillCircle($x, $y, $radius)
Параметры:
  • $xint
  • $yint
  • $radiusint
fillTriangle($x1, $y1, $x2, $y2, $x3, $y3)
Параметры:
  • $x1int
  • $y1int
  • $x2int
  • $y2int
  • $x3int
  • $y3int
getPixel($x, $y)
Параметры:
  • $xint
  • $yint
Результат:

int The pixel color in RGBA8888 format.

getWidth()
Результат:int
getHeight()
Результат:int
dispose()
drawPixel($x, $y, $color)
Параметры:
  • $xint
  • $yint
  • $colorint - (optional)
getGLFormat()
Результат:int one of GL_ALPHA, GL_RGB, GL_RGBA, GL_LUMINANCE, or GL_LUMINANCE_ALPHA.
getGLInternalFormat()
Результат:int one of GL_ALPHA, GL_RGB, GL_RGBA, GL_LUMINANCE, or GL_LUMINANCE_ALPHA.
getGLType()
Результат:int one of GL_UNSIGNED_BYTE, GL_UNSIGNED_SHORT_5_6_5, GL_UNSIGNED_SHORT_4_4_4_4
getFormat()
Результат:string
getBlending()
Результат:string None, SourceOver
static setBlending($blending)

Sets the type of Blending to be used for all operations. Default is ‘SourceOver’

Параметры:
  • $blendingstring
static setFilter($filter)

Filters to be used with Pixmap.drawPixmap(Pixmap, int, int, int, int, int, int, int, int).

Параметры:
  • $filterstring - NearestNeighbour, BiLinear
Sprite
php\gdx\graphics\Sprite

Class Sprite

Methods


__construct($texture, $width, $height, $x, $y)
Параметры:
  • $texturephp\gdx\graphics\Texture - (optional)
  • $widthint - (optional)
  • $heightint - (optional)
  • $xint - (optional)
  • $yint - (optional)
setBounds($x, $y, $width, $height)
Параметры:
  • $xint
  • $yint
  • $widthint
  • $heightint
setSize($width, $height)
Параметры:
  • $widthint
  • $heightint
setPosition($x, $y)
Параметры:
  • $xint
  • $yint
setX($x)
Параметры:
  • $xint
getX()
Результат:int
setY($y)
Параметры:
  • $yint
getY()
Результат:int
translateX($xAmount)
Параметры:
  • $xAmountdouble
translateY($yAmount)
Параметры:
  • $yAmountdouble
translate($xAmount, $yAmount)
Параметры:
  • $xAmountdouble
  • $yAmountdouble
setAlpha($alpha)
Параметры:
  • $alphadouble
setOrigin($originX, $originY)
Параметры:
  • $originXint
  • $originYint
setOriginCenter()
setRotation($degrees)
Параметры:
  • $degreesdouble
getRotation()
Результат:double
rotate($degrees)
Параметры:
  • $degreesdouble
rotate90($clockwise)
Параметры:
  • $clockwisebool
setScale($scaleXY, $scaleY)
Параметры:
  • $scaleXYdouble
  • $scaleYdouble - (optional)
scale($amount)
Параметры:
  • $amountdouble
flip($x, $y)
Параметры:
  • $xint
  • $yint
scroll($xAmount, $yAmount)
Параметры:
  • $xAmountdouble
  • $yAmountdouble
draw($batch, $alphaModulation)
Параметры:
SpriteBatch
php\gdx\graphics\SpriteBatch

extends: php\gdx\graphics\Batch

Texture
php\gdx\graphics\Texture

Class Texture

Methods


static ofFile($fileHandle, $useMipMaps = false, $format)
Параметры:
Результат:

php\gdx\graphics\Texture

__construct($pixmap, $useMipMaps = false, $format)
Параметры:
getWidth()
Результат:int
getHeight()
Результат:int
getDepth()
Результат:int
isManaged()
Результат:bool
Graphics
php\gdx\Graphics

Class Graphics

Methods


isGL30Available()
Результат:bool
getWidth()
Результат:int
getHeight()
Результат:int
getDeltaTime()
Результат:double
getRawDeltaTime()
Результат:double
getFramesPerSecond()
Результат:int
getDensity()
Результат:float
supportsDisplayModeChange()
Результат:bool
getDisplayModes()
Результат:php\gdx\DisplayMode[] the supported fullscreen DisplayMode(s)
getDesktopDisplayMode()
Результат:php\gdx\graphics\DisplayMode
setDisplayMode($widthOrDisplayMode, $height, $fullscreen)
Параметры:
setTitle($title)
Параметры:
  • $titlestring
setVSync($vsync)
Параметры:
  • $vsyncbool
supportsExtension($extension)
Параметры:
  • $extensionstring
Результат:

bool

setContinuousRendering($value)
Параметры:
  • $valuebool
isContinuousRendering()
Результат:bool
requestRendering()
isFullscreen()
Результат:bool
Input
php\gdx\Input

final class

Methods


__construct()

private

getAccelerometerX()
Результат:double The value of the accelerometer on its x-axis. ranges between [-10,10].
getAccelerometerY()
Результат:double The value of the accelerometer on its y-axis. ranges between [-10,10].
getAccelerometerZ()
Результат:double The value of the accelerometer on its y-axis. ranges between [-10,10].
getX($pointer)

Returns the x coordinate of the last touch on touch screen devices and the current mouse position on desktop for the first pointer in screen coordinates. The screen origin is the top left corner.

Параметры:
  • $pointerint - (optional) the pointer id. Returns the x coordinate in screen coordinates of the given pointer.
Результат:

int

getDeltaX($pointer)
Параметры:
  • $pointerint - (optional) the pointer id.
Результат:

int the different between the current pointer location and the last pointer location on the x-axis.

getY($pointer)

Returns the y coordinate of the last touch on touch screen devices and the current mouse position on desktop for the first pointer in screen coordinates. The screen origin is the top left corner.

Параметры:
  • $pointerint - (optional) the pointer id. Returns the y coordinate in screen coordinates of the given pointer.
Результат:

int

getDeltaY($pointer)
Параметры:
  • $pointerint - (optional) the pointer id.
Результат:

int the different between the current pointer location and the last pointer location on the y-axis.

isTouched($pointer)
Параметры:
  • $pointerint - (optional)
Результат:

bool whether the screen is currently touched.

justTouched()
Результат:bool whether a new touch down event just occurred.
isButtonPressed($button)

Whether a given button is pressed or not. Button constants can be found in {@link Buttons}. On Android only the Button#LEFT constant is meaningful.

Параметры:
  • $buttonint
Результат:

bool

isKeyPressed($key)

Returns whether the key is pressed.

Параметры:
  • $keyint
setOnscreenKeyboardVisible($visible)

Sets the on-screen keyboard visible if available.

Параметры:
  • $visiblebool
vibrate($millis)

Vibrates for the given amount of time. Note that you’ll need the permission <code> <uses-permission android:name=”android.permission.VIBRATE” /></code> in your manifest file in order for this to work.

Параметры:
  • $millisint - the number of milliseconds to vibrate.
cancelVibrate()
getAzimuth()

The azimuth is the angle of the device’s orientation around the z-axis. The positive z-axis points towards the earths center.

Результат:double
getPitch()

The pitch is the angle of the device’s orientation around the x-axis. The positive x-axis roughly points to the west and is orthogonal to the z- and y-axis.

Результат:double
getRoll()

The roll is the angle of the device’s orientation around the y-axis. The positive y-axis points to the magnetic north pole of the earth.

Результат:double
getCurrentEventTime()
Результат:int the time of the event currently reported to the InputProcessor.
setCatchBackKey($catchBack)

Sets whether the BACK button on Android should be caught. This will prevent the app from being paused. Will have no effect on the desktop.

Параметры:
  • $catchBackbool
setCatchMenuKey($catchMenu)

Sets whether the MENU button on Android should be caught. This will prevent the onscreen keyboard to show up. Will have no effect on the desktop.

Параметры:
  • $catchMenubool
getRotation()
Результат:int the rotation of the device with respect to its native orientation.
getNativeOrientation()
Результат:string the native orientation of the device.
setCursorCatched($catched)

Only viable on the desktop. Will confine the mouse cursor location to the window and hide the mouse cursor.

Параметры:
  • $catchedbool - whether to catch or not to catch the mouse cursor
isCursorCatched()
Результат:bool whether the mouse cursor is catched.
setCursorPosition($x, $y)

Only viable on the desktop. Will set the mouse cursor location to the given window coordinates (origin top-left corner).

Параметры:
  • $xint
  • $yint
setCursorImage($pixmap, $xHotspot, $yHotspot)

Only viable on the desktop. Will set the mouse cursor image to the image represented by the Pixmap. The Pixmap must be in RGBA8888 format, width & height must be powers-of-two greater than zero (not necessarily equal), and alpha transparency must be single-bit (i.e., 0x00 or 0xFF only). To revert to the default operating system cursor, pass in a null Pixmap; xHotspot & yHotspot are ignored in this case.

Параметры:
LwjglApplication
php\gdx\LwjglApplication

extends: php\gdx\Application

Methods


__construct($listener, $configuration)
Параметры:
LwjglApplicationConfiguration
php\gdx\LwjglApplicationConfiguration

Class ApplicationConfiguration

Properties


property useGL30

bool

property depth

int

property samples

int

property width

int

property height

int

property x

int

property y

:doc:` </api_en/.types/>`

property fullscreen

bool

property vSyncEnabled

bool

property title

string

property forceExit

bool

property resizable

bool

property audioDeviceSimultaneousSources

int

property audioDeviceBufferSize

int

property audioDeviceBufferCount

int

property foregroundFPS

int

property backgroundFPS

int

property allowSoftwareMode

bool

property preferencesDirectory

string

Methods


setFromDisplayMode($displayMode)
Параметры:
static getDesktopDisplayMode
Результат:php\gdx\graphics\DisplayMode
static getDisplayModes
Результат:php\gdx\DisplayMode[]
static addIcon($path, $type)

Adds a window icon. Icons are tried in the order added, the first one that works is used. Typically three icons should be provided: 128x128 (for Mac), 32x32 (for Windows and Linux), and 16x16 (for Windows).

Параметры:
  • $pathstring
  • $typestring - - Classpath, Internal, External, Absolute, Local
math
Polygon
php\gdx\math\Polygon

Class Polygon

Methods


__construct($vertices)
Параметры:
  • $verticesarray - (optional)
getVertices()

Returns the polygon’s local vertices without scaling or rotation and without being offset by the polygon position.

Результат:float[]
getTransformedVertices()
Результат:float[] vertices scaled, rotated, and offset by the polygon position.
setOrigin($originX, $originY)

Sets the origin point to which all of the polygon’s local vertices are relative to.

Параметры:
  • $originXfloat
  • $originYfloat
setPosition($x, $y)

Sets the polygon’s position within the world.

Параметры:
  • $xfloat
  • $yfloat
setVertices($vertices)
Параметры:
  • $verticesarray
translate($x, $y)

Translates the polygon’s position by the specified horizontal and vertical amounts.

Параметры:
  • $xfloat
  • $yfloat
setRotation($degrees)

Sets the polygon to be rotated by the supplied degrees.

Параметры:
  • $degreesfloat
rotate($degrees)

Applies additional rotation to the polygon by the supplied degrees.

Параметры:
  • $degreesfloat
setScale($scaleX, $scaleY)

Sets the amount of scaling to be applied to the polygon.

Параметры:
  • $scaleXfloat
  • $scaleYfloat
scale($amount)

Applies additional scaling to the polygon by the supplied amount.

Параметры:
  • $amountfloat
dirty()
area()

Returns the area contained within the polygon.

Результат:float
contains($x, $y)
Параметры:
  • $xfloat
  • $yfloat
Результат:

bool

getX()
Результат:float
getY()
Результат:float
getOriginX()
Результат:float
getOriginY()
Результат:float
getRotation()
Результат:float
getScaleX()
Результат:float
getScaleY()
Результат:float
Polyline
php\gdx\math\Polyline

Class Polyline

Methods


__construct($vertices)
Параметры:
  • $verticesarray - (optional)
getVertices()

Returns the polyline’s local vertices without scaling or rotation and without being offset by the polyline position.

Результат:float[]
getTransformedVertices()
Результат:float[] vertices scaled, rotated, and offset by the polyline position.
getLength()
Результат:float Returns the euclidean length of the polyline without scaling
getScaledLength()
Результат:float Returns the euclidean length of the polyline
calculateLength()
calculateScaledLength()
dirty()
setOrigin($originX, $originY)

Sets the origin point to which all of the polyline’s local vertices are relative to.

Параметры:
  • $originXfloat
  • $originYfloat
setPosition($x, $y)

Sets the polyline’s position within the world.

Параметры:
  • $xfloat
  • $yfloat
setVertices($vertices)
Параметры:
  • $verticesarray
translate($x, $y)

Translates the polyline’s position by the specified horizontal and vertical amounts.

Параметры:
  • $xfloat
  • $yfloat
setRotation($degrees)

Sets the polyline to be rotated by the supplied degrees.

Параметры:
  • $degreesfloat
rotate($degrees)

Applies additional rotation to the polyline by the supplied degrees.

Параметры:
  • $degreesfloat
setScale($scaleX, $scaleY)

Sets the amount of scaling to be applied to the polyline.

Параметры:
  • $scaleXfloat
  • $scaleYfloat
scale($amount)

Applies additional scaling to the polyline by the supplied amount.

Параметры:
  • $amountfloat
getX()
Результат:float
getY()
Результат:float
getOriginX()
Результат:float
getOriginY()
Результат:float
getRotation()
Результат:float
getScaleX()
Результат:float
getScaleY()
Результат:float
Vector2
php\gdx\math\Vector2

Class Vector2

Methods


__construct($x, $y)
Параметры:
x()
Результат:float
y()
Результат:float
len()
Результат:float The euclidean length
len2()
Результат:float The squared euclidean length
set($x, $y)

Sets this vector from the given vector or x, y

Параметры:
Результат:

php\gdx\math\Vector2

sub($x, $y)

Subtracts the given vector from this vector.

Параметры:
Результат:

php\gdx\math\Vector2

nor()

Normalizes this vector. Does nothing if it is zero.

Результат:php\gdx\math\Vector2
add($x, $y)

Adds the given vector to this vector

Параметры:
dot($ox, $oy)
Параметры:
Результат:

float The dot product between this and the other vector

scl($x, $y)

Scales this vector by a scalar

Параметры:
  • $xfloat
  • $yfloat - (optional)
Результат:

php\gdx\math\Vector2

mulAdd($vec, $scalar)

First scale a supplied vector, then add it to this vector.

Параметры:
Результат:

php\gdx\math\Vector2

dst($x, $y)
Параметры:
Результат:

float the distance between this and the other vector

dst2($x, $y)
Параметры:
Результат:

float the squared distance between this and the other vector

limit($limit)
Параметры:
  • $limitfloat
Результат:

php\gdx\math\Vector2

clamp($min, $max)
Параметры:
  • $minfloat
  • $maxfloat
Результат:

php\gdx\math\Vector2

crs($x, $y)
Параметры:
Результат:

float

angle()
Результат:float
getAngleRad()
Результат:float
setAngle($degrees)
Параметры:
  • $degreesfloat
Результат:

php\gdx\math\Vector2

setAngleRad($radians)
Параметры:
  • $radiansfloat
Результат:

php\gdx\math\Vector2

rotate($degrees)
Параметры:
  • $degreesfloat
Результат:

php\gdx\math\Vector2

rotateRad($radians)
Параметры:
  • $radiansfloat
Результат:

php\gdx\math\Vector2

rotate90($dir)
Параметры:
  • $dirint
Результат:

php\gdx\math\Vector2

lerp($target, $alpha)

Linearly interpolates between this vector and the target vector by alpha which is in the range [0,1]. The result is stored in this vector.

Параметры:
Результат:

php\gdx\math\Vector2

epsilonEquals($other, $epsilon)

Compares this vector with the other vector, using the supplied epsilon for fuzzy equality testing.

Параметры:
Результат:

bool

isUnit($margin)

Whether this vector is a unit length vector

Параметры:
  • $marginfloat - (optional)
Результат:

bool

isZero($margin)
Параметры:
  • $marginfloat - (optional)
isOnLine($other, $epsilon)
Параметры:
Результат:

bool

isCollinear($other, $epsilon)
Параметры:
Результат:

bool

isCollinearOpposite($other, $epsilon)
Параметры:
Результат:

bool

isPerpendicular($vector, $epsilon)
Параметры:
hasSameDirection($vector)
Параметры:
Результат:

bool

hasOppositeDirection($vector)
Параметры:
Результат:

bool

io

File
php\io\File

Class File

Constants


constant PATH_SEPARATOR
constant DIRECTORY_SEPARATOR
constant PATH_NAME_CASE_INSENSITIVE

Methods


__construct($path, $child = NULL)
Параметры:
  • $pathstring
  • $childnull, string
exists()
Результат:bool
canExecute()
Результат:bool
canWrite()
Результат:bool
canRead()
Результат:bool
getName()
Результат:string
getAbsolutePath()
Результат:string
getCanonicalPath()

throws php\io\IOException

Результат:string
getParent()
Результат:string
getPath()
Результат:string
getAbsoluteFile()
Результат:php\io\File
getCanonicalFile()

throws php\io\IOException

Результат:php\io\File
getParentFile()
Результат:php\io\File
mkdir()
Результат:bool
mkdirs()
Результат:bool
isFile()
Результат:bool
isDirectory()
Результат:bool
isAbsolute()
Результат:bool
isHidden()
Результат:bool
matches($pattern)
Параметры:
  • $patternstring - the “glob” and “regex” syntaxes, and may support others.
Результат:

bool

delete()
Результат:bool
deleteOnExit()
Результат:void
createNewFile($withDirs = false)
Параметры:
  • $withDirsbool
Результат:

bool

lastModified()
Результат:int
length()
Результат:int
crc32()
Результат:int, null null if not exists or io exception
hash($algorithm = 'MD5')
Параметры:
  • $algorithmstring
Результат:

string, null if not exists or io exception

renameTo($newName)
Параметры:
  • $newNamestring
Результат:

bool

setExecutable($value, $ownerOnly = true)
Параметры:
  • $valuebool
  • $ownerOnlybool
Результат:

bool

setWritable($value, $ownerOnly = true)
Параметры:
  • $valuebool
  • $ownerOnlybool
Результат:

bool

setReadable($value, $ownerOnly = true)
Параметры:
  • $valuebool
  • $ownerOnlybool
Результат:

bool

setReadOnly()
Результат:bool
setLastModified($time)
Параметры:
  • $timeint
Результат:

bool

compareTo($file)
Параметры:
Результат:

int

find($filter = null)

throws php\io\IOException

Параметры:
  • $filtercallable
Результат:

string[]

findFiles($filter = null)

throws php\io\IOException

Параметры:
  • $filtercallable - (File $directory, $name)
Результат:

php\io\File[]

static createTemp($prefix, $suffix, $directory = null)
Параметры:
  • $prefixstring
  • $suffixstring
  • $directorynull, php\io\File, string
Результат:

php\io\File

static listRoots

List the available filesystem roots. Returns an array of objects denoting the available filesystem roots, or empty array if the set of roots could not be determined. The array will be empty if there are no filesystem roots.

Результат:php\io\File[]
static of($path)
Параметры:
  • $pathstring
Результат:

php\io\File

FileStream
php\io\FileStream

extends: php\io\Stream

Methods


read($length)

throws php\io\IOException

Параметры:
  • $lengthint - - count of bytes
Результат:

mixed

readFully()

throws php\io\IOException

Результат:mixed
write($value, $length = null)

throws php\io\IOException

Параметры:
  • $valuestring
  • $lengthnull, int
Результат:

int

eof()
Результат:bool
seek($position)

throws php\io\IOException

Параметры:
  • $positionint
Результат:

mixed

getPosition()

throws php\io\IOException

Результат:int
close()
Результат:mixed
length()
Результат:int
getFilePointer()

throws php\io\IOException

Результат:int
truncate($size)

throws php\io\IOException

Параметры:
  • $sizeint
IOException
php\io\IOException

extends: php\lang\JavaException

Class IOException

MemoryStream
php\io\MemoryStream

extends: php\io\MiscStream

Class MemoryStream

Methods


__construct()
MiscStream
php\io\MiscStream

extends: php\io\Stream

Children


Methods


read($length)

throws php\io\IOException

Параметры:
  • $lengthint - - count of bytes
Результат:

mixed

readFully()

throws php\io\IOException

Результат:mixed
write($value, $length = null)

throws php\io\IOException

Параметры:
  • $valuestring
  • $lengthnull, int
Результат:

int

eof()
Результат:bool
seek($position)

throws php\io\IOException

Параметры:
  • $positionint
Результат:

mixed

getPosition()

throws php\io\IOException

Результат:int
close()
Результат:mixed
length()
Результат:int
flush()

throws php\io\IOException

ResourceStream
php\io\ResourceStream

extends: php\io\Stream

Class ResourceStream

Methods


__construct($path)
Параметры:
  • $pathstring
read($length)

throws php\io\IOException

Параметры:
  • $lengthint - - count of bytes
Результат:

mixed

readFully()

throws php\io\IOException

Результат:mixed
write($value, $length = null)

throws php\io\IOException

Параметры:
  • $valuestring
  • $lengthnull, int
Результат:

int

eof()
Результат:bool
seek($position)

throws php\io\IOException

Параметры:
  • $positionint
Результат:

mixed

getPosition()

throws php\io\IOException

Результат:int
close()
Результат:mixed
toExternalForm()
Результат:string
static getResources($name)
Параметры:
  • $namestring
Результат:

php\io\ResourceStream[]

Stream
php\io\Stream

abstract class

Children


Properties


property path

string

private

property mode

string

private

Methods


getPath()
Результат:string
getMode()
Результат:string
read($length)

abstract

throws php\io\IOException

Параметры:
  • $lengthint - - count of bytes
Результат:

mixed

readFully()

abstract

throws php\io\IOException

Результат:mixed
write($value, $length = null)

abstract

throws php\io\IOException

Параметры:
  • $valuestring
  • $lengthnull, int
Результат:

int

eof()

abstract

Результат:bool
seek($position)

abstract

throws php\io\IOException

Параметры:
  • $positionint
Результат:

mixed

getPosition()

abstract

throws php\io\IOException

Результат:int
close()

abstract

Результат:mixed
__construct($path, $mode = null)
Параметры:
  • $pathstring
  • $modenull, string
Результат:

php\io\Stream

setContext($context)
Параметры:
  • $context
Результат:

void

getContext()
Результат:mixed
static of($path, $mode = 'r')

throws php\io\IOException

Параметры:
  • $pathstring
  • $modestring
Результат:

php\io\Stream

static getContents($path, $mode = 'r')

Create a stream, call and return the result of the readFully() method, finally call the close() method.

throws php\io\IOException

Параметры:
  • $pathstring
  • $modestring
Результат:

string binary

static putContents($path, $data, $mode = 'w+')

Create a stream, call and return the result of the write() method, finally call the close() method.

throws php\io\IOException

Параметры:
  • $pathstring
  • $datastring
  • $modestring
static tryAccess($path, $onAccess, $mode = 'r')

Open a stream and close it after calling $onAccess automatically.

throws php\io\IOException

Параметры:
  • $pathstring
  • $onAccesscallable - (Stream $stream)
  • $modestring
static exists($path)

Checks stream is exists. It tries to open a stream and if all is ok, returns true and closes it.

throws php\io\\Exception if you check external streams like http or ftp

Параметры:
  • $pathstring
Результат:

bool

static register($protocol, $className)
Параметры:
  • $protocolstring
  • $classNamestring
static unregister($protocol)
Параметры:
  • $protocol

jsoup

Connection
php\jsoup\Connection

abstract class

Constants


constant METHOD_POST
constant METHOD_GET

Methods


data($data)
Параметры:
  • $dataarray
Результат:

php\jsoup\Connection

cookies($data)
Параметры:
  • $dataarray
Результат:

php\jsoup\Connection

headers($data)
Параметры:
  • $dataarray
Результат:

php\jsoup\Connection

Параметры:
  • $namestring
  • $valuestring
Результат:

php\jsoup\Connection

url($url)
Параметры:
  • $urlstring
Результат:

php\jsoup\Connection

method($method)
Параметры:
  • $methodstring - POST or GET
Результат:

php\jsoup\Connection

userAgent($userAgent)
Параметры:
  • $userAgentstring
Результат:

php\jsoup\Connection

maxBodySize($bytes)
Параметры:
  • $bytesint
Результат:

php\jsoup\Connection

timeout($millis)
Параметры:
  • $millisint
Результат:

php\jsoup\Connection

referrer($referrer)
Параметры:
  • $referrerstring
Результат:

php\jsoup\Connection

followRedirects($enable)
Параметры:
  • $enablebool
Результат:

php\jsoup\Connection

ignoreHttpErrors($enable)
Параметры:
  • $enablebool
Результат:

php\jsoup\Connection

ignoreContentType($enable)
Параметры:
  • $enablebool
Результат:

php\jsoup\Connection

execute()
Результат:php\jsoup\ConnectionResponse
get()
Результат:php\jsoup\Document
post()
Результат:php\jsoup\Document
request()
Результат:php\jsoup\ConnectionRequest
response()
Результат:php\jsoup\ConnectionResponse
ConnectionRequest
php\jsoup\ConnectionRequest

abstract class

Methods


timeout($millis)

Setter and getter for timeout.

Параметры:
  • $millisint - (optional)
Результат:

int, php\jsoup\ConnectionRequest

maxBodySize($bytes)

Setter and getter for max of body size.

Параметры:
  • $bytesint - (optional)
Результат:

int, php\jsoup\ConnectionRequest

followRedirects($enable)

Setter and getter.

Параметры:
  • $enablebool - (optional)
Результат:

bool, php\jsoup\ConnectionRequest

ignoreHttpErrors($enable)
Параметры:
  • $enablebool - (optional)
Результат:

bool, php\jsoup\ConnectionRequest

ignoreContentType($enable)
Параметры:
  • $enablebool - (optional)
Результат:

bool, php\jsoup\ConnectionRequest

ConnectionResponse
php\jsoup\ConnectionResponse

abstract class

Methods


headers()
Результат:array
cookies()
Результат:array
statusCode()

Get the status code of the response.

Результат:int
statusMessage()

Get the status message of the response.

Результат:string
charset()
Результат:string
body()
Результат:string
bodyAsBytes()
Результат:string binary string
contentType()

Get the response content type (e.g. “text/html”);

Результат:string
parse()
Результат:php\jsoup\Document
Document
php\jsoup\Document

abstract class

Methods


location()
Результат:string
title($value)
Параметры:
  • $valuestring - (optional)
Результат:

string

Результат:php\jsoup\Element
body()
Результат:php\jsoup\Element
select($cssQuery)
Параметры:
  • $cssQuerystring
Результат:

php\jsoup\Elements

Element
php\jsoup\Element

abstract class

Methods


html($html)
Параметры:
  • $htmlstring - (optional)
Результат:

string

text()
Результат:string
nodeName()
Результат:string
tagName($tagName)
Параметры:
  • $tagNamestring - (optional)
Результат:

string

isBlock()
Результат:bool
id()
Результат:string
attr($attributeKey, $attributeValue)
Параметры:
  • $attributeKey
  • $attributeValue
    • (optional)
Результат:

php\jsoup\$this

dataset()
Результат:array
parent()
Результат:php\jsoup\Element
parents()
Результат:php\jsoup\Elements
child($index)
Параметры:
  • $indexint
Результат:

php\jsoup\Element

children()
Результат:php\jsoup\Elements
select($cssQuery)
Параметры:
  • $cssQuerystring
Результат:

php\jsoup\Elements

Elements
php\jsoup\Elements

abstract class

implements: Iterator

Methods


text()
Результат:string
hasText()
Результат:bool
html($html)
Параметры:
  • $htmlstring - (optional)
Результат:

string

outerHtml()
Результат:string
attr($attributeKey, $value)
Параметры:
  • $attributeKeystring
  • $value
    • (optional)
Результат:

string, php\jsoup\$this

hasAttr($attributeKey)
Параметры:
  • $attributeKeystring
Результат:

bool

removeAttr($attributeKey)
Параметры:
  • $attributeKeystring
Результат:

php\jsoup\Elements

addClass($class)
Параметры:
  • $classstring
Результат:

php\jsoup\Elements

removeClass($class)
Параметры:
  • $classstring
Результат:

php\jsoup\Elements

hasClass($class)
Параметры:
  • $classstring
Результат:

bool

toggleClass($class)
Параметры:
  • $classstring
Результат:

bool

val($value)
Параметры:
  • $valuestring - (optional)
Результат:

php\jsoup\$this

prepend($html)
Параметры:
  • $htmlstring
Результат:

php\jsoup\Elements

append($html)
Параметры:
  • $htmlstring
Результат:

php\jsoup\Elements

before($html)
Параметры:
  • $htmlstring
Результат:

php\jsoup\Elements

after($html)
Параметры:
  • $htmlstring
Результат:

php\jsoup\Elements

select($query)
Параметры:
  • $querystring
Результат:

php\jsoup\Elements

first()
Результат:php\jsoup\Element
last()
Результат:php\jsoup\Element
not($query)
Параметры:
  • $querystring
Результат:

php\jsoup\Elements

is($query)
Параметры:
  • $querystring
Результат:

bool

parents()
Результат:php\jsoup\Elements
Jsoup
php\jsoup\Jsoup

final class

Methods


__construct()

private

static connect($url)
Параметры:
  • $urlstring
Результат:

php\jsoup\Connection

static parse($source, $encoding, $baseUri)
Параметры:
Результат:

php\jsoup\Document

static parseText($text, $baseUri)
Параметры:
  • $textstring
  • $baseUristring - (optional)
Результат:

php\jsoup\Document

lang

ClassLoader
php\lang\ClassLoader

abstract class

Children


Methods


loadClass($name)

abstract

Параметры:
  • $namestring
register()
unregister()
Environment
php\lang\Environment

Class Environment

Constants


constant CONCURRENT
constant HOT_RELOAD

Methods


__construct($parent = NULL, $flags = 0)
Параметры:
  • $parentphp\lang\Environment
  • $flagsint - Environment::HOT_RELOAD, Environment::CONCURRENT
registerSourceMap($sourceMap)
Параметры:
unregisterSourceMap($sourceMap)
Параметры:
execute($runnable)

Executes $runnable in the environment

Параметры:
  • $runnablecallable - - in new environment
Результат:

mixed

importClass($className)

Imports the $className to the environment

throws php\lang\\Exception - if class not found or already registered

Параметры:
  • $classNamestring
exportClass($className)

Exports the $className from th environment

throws php\lang\\Exception - if class not found or already registered

Параметры:
  • $classNamestring
importFunction($functionName)

Imports the $functionName to the environment

throws php\lang\\Exception - if function not found or already registered

Параметры:
  • $functionNamestring
exportFunction($functionName)

Exports the $functionName from the environment

throws php\lang\\Exception - if function not found or already registered

Параметры:
  • $functionNamestring
importAutoLoaders()
defineConstant($name, $value, $caseSensitive = true)

throws php\lang\\Exception - if constant already registered or value is not scalar type

Параметры:
  • $namestring
  • $valuemixed - - scalar value
  • $caseSensitivebool
onMessage($callback)

Handles messages that sent to the environment

Параметры:
  • $callbackcallable
onOutput($callback)
Параметры:
  • $callbackcallable
sendMessage($message)

Send message to the environment

Параметры:
  • $messagemixed
Результат:

mixed

findModule($path)
Параметры:
  • $pathstring
Результат:

php\lang\Module, null

static current

Get environment of current execution

Результат:php\lang\Environment
IllegalArgumentException
php\lang\IllegalArgumentException

extends: php\lang\JavaException

Class IllegalArgumentException

IllegalStateException
php\lang\IllegalStateException

extends: php\lang\JavaException

Class IllegalStateException

InterruptedException
php\lang\InterruptedException

extends: php\lang\JavaException

Class InterruptedException

Invoker
php\lang\Invoker

Class for calling methods/functions/etc.

Methods


__construct($callback)
Параметры:
  • $callbackcallable
callArray($args)

Call with array arguments

Параметры:
  • $argsarray
Результат:

mixed

call()

Call the current callback

Результат:int, mixed
__invoke()
canAccess()

Check access to invoke the method at a moment

Результат:bool
getDescription()

Returns description of the method - name + argument info

Результат:string
getArgumentCount()

Returns argument count of the method

Результат:int
isClosure()

Checks it is a closure

Результат:bool
isNamedFunction()

Checks it is a named function

Результат:bool
isStaticCall()

Checks it is a static call

Результат:bool
isDynamicCall()

Checks it is a dynamic call

Результат:bool
static of($callback)
Параметры:
  • $callbackmixed, callable
Результат:

php\lang\Invoker, null - returns null if passed is not callable

JavaClass
php\lang\JavaClass

final class

Methods


__construct($className)

throws php\lang\JavaException if not found class

Параметры:
  • $classNamestring - - full name of java class
isStatic()
Результат:bool
isFinal()
Результат:bool
isAbstract()
Результат:bool
isInterface()
Результат:bool
isEnum()
Результат:bool
isAnnotation()
Результат:bool
isArray()
Результат:bool
isPrimitive()
Результат:bool
isAnonymousClass()
Результат:bool
isMemberClass()
Результат:bool
getName()
Результат:string
getSimpleName()
Результат:string
getCanonicalName()
Результат:string
getSuperClass()
Результат:php\lang\JavaClass, null
getModifiers()
Результат:int
isAnnotationPresent($annotationClassName)

throws php\lang\JavaException if class not found

Параметры:
  • $annotationClassNamestring
Результат:

bool

getInterfaces()
Результат:php\lang\JavaClass[]
getDeclaredMethod($name, $types)

throws php\lang\JavaException

Параметры:
  • $namestring
  • $typesarray
Результат:

php\lang\JavaMethod

getDeclaredMethods()
Результат:php\lang\JavaMethod[]
getDeclaredField($name)

throws php\lang\JavaException

Параметры:
  • $name
Результат:

php\lang\JavaField

getDeclaredFields()
Результат:php\lang\JavaField[]
newInstance()

throws php\lang\JavaException

Результат:php\lang\JavaObject
newInstanceArgs($types, $arguments)

throws php\lang\JavaException

Параметры:
  • $typesarray
  • $argumentsarray
Результат:

php\lang\JavaObject

isAssignableFrom($class)
Параметры:
Результат:

bool

isSubClass($className)

throws php\lang\JavaException

Параметры:
  • $classNamestring
Результат:

bool

getEnumConstants()
Результат:php\lang\JavaObject[]
getResource($name)
Параметры:
  • $namestring
Результат:

string, null - filename

static primitive($name)
Параметры:
  • $namestring - - [int, byte, short, char, float, double, boolean, long]
JavaException
php\lang\JavaException

extends: Exception

Children


Methods


isRuntimeException()

Check exception instance of java.lang.RuntimeException

Результат:bool
isNullPointerException()

Check exception instance of java.lang.NullPointerException

Результат:bool
isIllegalArgumentException()

Check exception instance of java.lang.IllegalArgumentException

Результат:bool
isNumberFormatException()

Check exception instance of java.lang.NumberFormatException

Результат:bool
getExceptionClass()
Результат:php\lang\JavaClass
getJavaException()
Результат:php\lang\JavaObject
printJVMStackTrace()
JavaField
php\lang\JavaField

final class

extends: php\lang\JavaReflection

Methods


get($object = null)

throws php\lang\JavaException

Параметры:
Результат:

mixed

set($object = null, $value)

throws php\lang\JavaException

Параметры:
isStatic()
Результат:bool
isFinal()
Результат:bool
isPublic()
Результат:bool
isProtected()
Результат:bool
isPrivate()
Результат:bool
isTransient()
Результат:bool
isVolatile()
Результат:bool
getModifiers()
Результат:int
getName()
Результат:string
getDeclaringClass()
Результат:php\lang\JavaClass
JavaMethod
php\lang\JavaMethod

final class

extends: php\lang\JavaReflection

Methods


invoke($object = null)

Invoke method

Параметры:
invokeArgs($object = null, $arguments)
Параметры:
getName()
Результат:string
isStatic()
Результат:bool
isFinal()
Результат:bool
isAbstract()
Результат:bool
isPublic()
Результат:bool
isProtected()
Результат:bool
isPrivate()
Результат:bool
isNative()
Результат:bool
isSynchronized()
Результат:bool
isVarArgs()
Результат:bool
getDeclaringClass()
Результат:php\lang\JavaClass
getReturnedType()
Результат:php\lang\JavaClass
isAnnotationPresent($annotationClassName)

throws php\lang\JavaException

Параметры:
  • $annotationClassNamestring
Результат:

bool

getParameterTypes()
Результат:php\lang\JavaClass[]
getParameterCount()
Результат:int
JavaObject
php\lang\JavaObject

final class

Methods


getClass()

Get class of object

Результат:php\lang\JavaClass
getClassName()

Get name of class of object

Результат:string
JavaReflection
php\lang\JavaReflection

abstract class

Children


Module
php\lang\Module

Class Module

Methods


__construct($source, $compiled = false, $debugInformation = true)

Register all functions and classes of module in current environment

Параметры:
getName()
Результат:string
call($variables = null)

Include module and return result

Параметры:
  • $variablesarray
Результат:

mixed

dump($target, $saveDebugInfo = true)

throws >

Параметры:
NotImplementedException
php\lang\NotImplementedException

extends: Exception

Class NotImplementedException

NumberFormatException
php\lang\NumberFormatException

extends: php\lang\JavaException

Class NumberFormatException

Process
php\lang\Process

Class Process

Methods


__construct($commands, $directory = null, $environment = null)
Параметры:
  • $commandsarray
  • $directorynull, string, php\io\File
  • $environmentarray
start()

throws php\lang\IllegalStateException

Результат:php\lang\Process
startAndWait()

Causes the current thread to wait, if necessary, until the process represented by this Process object has terminated. This method returns immediately if the subprocess has already terminated. If the subprocess has not yet terminated, the calling thread will be blocked until the subprocess exits.

throws php\lang\IllegalStateException

Результат:php\lang\Process
getExitValue()

Returns the exit value for the subprocess.

throws php\lang\IllegalStateException

Результат:int, null - null if process is working
destroy()

Kills the subprocess. The subprocess represented by this Process object is forcibly terminated.

throws php\lang\IllegalStateException

getInput()

Returns the input stream connected to the normal output of the subprocess. The stream obtains data piped from the standard output of the process represented by this Process object.

throws php\lang\IllegalStateException

Результат:php\io\Stream
getOutput()

Returns the output stream connected to the normal input of the subprocess. Output to the stream is piped into the standard input of the process represented by this Process object.

throws php\lang\IllegalStateException

Результат:php\io\Stream
getError()

Returns the input stream connected to the error output of the subprocess. The stream obtains data piped from the error output of the process represented by this Process object.

throws php\lang\IllegalStateException

Результат:php\io\Stream
SourceMap
php\lang\SourceMap

Class SourceMap

Methods


__construct($moduleName)
Параметры:
  • $moduleNamestring
getModuleName()
Результат:string
getSourceLine($compiledLine)
Параметры:
  • $compiledLineint
Результат:

int -1 if not found

getCompiledLine($sourceLine)
Параметры:
  • $sourceLineint
Результат:

int -1 if not found

insertLines($inserts, $allCountLines)
Параметры:
  • $insertsarray - int[][2] [[line, lineCount], [line, lineCount], ...]
  • $allCountLinesint - original source line count.
addLine($sourceLine, $compiledLine)
Параметры:
  • $sourceLineint
  • $compiledLineint
clear()
toArray()
Результат:array
System
php\lang\System

final class

Methods


__construct()

private

static halt($status)

Exit from program with status globally

Параметры:
  • $statusint
static gc
static getEnv
Результат:string[]
static getProperty($name, $def = '')

Gets a system property by name

Параметры:
  • $name
  • $defstring
Результат:

string

Thread
php\lang\Thread

Class Thread

Constants


constant MAX_PRIORITY
constant MIN_PRIORITY
constant NORM_PRIORITY

Methods


__construct($runnable, $env = null, $group = null)
Параметры:
getId()
Результат:int
getName()
Результат:string
setName($value)
Параметры:
  • $valuestring
getGroup()
Результат:php\lang\ThreadGroup
isDaemon()
Результат:bool
setDaemon($value)
Параметры:
  • $valuebool
isInterrupted()
Результат:bool
isAlive()
Результат:bool
start()
run()
interrupt()
join($millis = 0, $nanos = 0)

Waits at most $millis milliseconds plus $nanos nanoseconds for this thread to die.

Параметры:
  • $millisint
  • $nanosint
static doYield
static sleep($millis, $nanos = 0)

Causes the currently executing thread to sleep (temporarily cease execution)

Параметры:
  • $millisint
  • $nanosint
static getActiveCount
Результат:int
static current

Get current thread

Результат:php\lang\Thread
ThreadGroup
php\lang\ThreadGroup

Class ThreadGroup

Methods


__construct($name, $parent = null)
Параметры:
getName()
Результат:string
getParent()
Результат:php\lang\ThreadGroup, null
getActiveCount()
Результат:int
getActiveGroupCount()
Результат:int
isDaemon()
Результат:bool
setDaemon($value)
Параметры:
  • $valuebool
isDestroyed()
Результат:bool
getMaxPriority()
Результат:int
setMaxPriority($value)
Параметры:
  • $valueint
destroy()
checkAccess()

Determines if the currently running thread has permission to modify this thread group.

throws php\lang\JavaException

interrupt()
ThreadPool
php\lang\ThreadPool

Class ThreadPool

Methods


__construct()

private

isScheduled()

Is Scheduled ?

Результат:bool
isShutdown()

Is Shutdown?

Результат:bool
isTerminated()
Результат:bool
execute($runnable, $env = null)

Execute some $runnable via the Executor Service

Параметры:
submit($runnable, $env = null)
Параметры:
Результат:

php\concurrent\Future

schedule($runnable, $delay, $env = null)
Параметры:
Результат:

php\concurrent\Future

shutdown()
shutdownNow()
awaitTermination($timeout)

Blocks until all tasks have completed execution after a shutdown request, or the timeout occurs, or the current thread is interrupted, whichever happens first.

throws php\lang\\Exception

Параметры:
  • $timeoutint - - in milliseconds
Результат:

bool

static create($coreSize, $maxSize, $keepAliveTime = 0)
Параметры:
  • $coreSizeint - the number of threads to keep in the pool, even if they are idle
  • $maxSizeint - the maximum number of threads to allow in the pool
  • $keepAliveTimeint - in millis
Результат:

php\lang\ThreadPool

static createFixed($max)
Параметры:
  • $maxint
Результат:

php\lang\ThreadPool

static createCached
Результат:php\lang\ThreadPool
static createSingle

Creates an Executor that uses a single worker thread operating off an unbounded queue.

Результат:php\lang\ThreadPool
static createScheduled($corePoolSize)

Creates a thread pool that can schedule commands to run after a given delay, or to execute periodically.

Параметры:
  • $corePoolSizeint
Результат:

php\lang\ThreadPool

lib

arr
php\lib\arr

Library for working with collections - arrays, iterators, etc.

Methods


__construct()

private

static count($collection)

Returns element count of the collection

Предупреждение

for iterators it will iterate all elements to return the result

Параметры:
  • $collectionarray, Countable, Iterator
Результат:

int element count

static has($collection, $value, $strict = false)
Параметры:
  • $collectionarray, Traversable
  • $valuemixed
  • $strictbool
Результат:

bool

static toArray($collection, $withKeys = false)

Converts $collection to array

Параметры:
  • $collectionarray, Iterator
  • $withKeysbool
Результат:

array

static of($collection, $withKeys = false)

Alias of toArray()

Параметры:
  • $collectionarray, Iterator
  • $withKeysbool, php\lib\false
Результат:

array

static toList($collection)

Example: items::toList([‘x’ => 10, 20], 30, [‘x’ => 50, 60]) -> [10, 20, 30, 50, 60]

Параметры:
  • $collection
Результат:

array

static keys($collection)

Returns all keys of collection

Параметры:
  • $collectionarray, Iterator
Результат:

array

static combine($keys, $values)

Combines two collections to array.

Параметры:
  • $keysarray, Iterator
  • $valuesarray, Iterator
Результат:

array, null returns null if size of arrays is not equals.

static map($collection, $callback)
Параметры:
  • $collectionarray, Iterator
  • $callbackcallable
static flatten($collection, $maxLevel = -1)

Returns a new array that is a one-dimensional flattening of this collection (recursively). That is, for every element that is an collection, extract its elements into the new array. If the optional $maxLevel argument > -1 the level of recursion to flatten.

Параметры:
  • $collectionarray, Iterator
  • $maxLevelint
Результат:

array

static sort($collection, $comparator = null, $saveKeys = false)

Sorts the specified list into ascending order

Параметры:
  • $collectionarray, Iterator
  • $comparatorcallable - ($o1, $o2) -> int where -1 smaller, 0 equal, 1 greater
  • $saveKeysbool
Результат:

array

static sortByKeys($collection, $comparator = null, $saveKeys = false)

Sorts the specified list into ascending order by keys

Параметры:
  • $collectionarray, Iterator
  • $comparatorcallable - ($key1, $key2)
  • $saveKeysbool
Результат:

array

static peak($array)

Returns the last element of array.

Параметры:
  • $array
Результат:

mixed last value of array

static push($array, $values)
Параметры:
  • $arrayarray, ArrayAccess
  • $values
static pop($array)
Параметры:
  • $arrayarray
Результат:

mixed

static shift($array)
Параметры:
  • $arrayarray
Результат:

mixed

static unshift($array, $values)
Параметры:
  • $arrayarray
  • $values
static first($collection)
Параметры:
  • $collectionTraversable, array
Результат:

mixed

static firstKey($collection)
Параметры:
  • $collectionTraversable, array
Результат:

string, int, null

static reverse($array)
Параметры:
  • $arrayarray
Результат:

array

bin
php\lib\bin

Methods


__construct()

private

static of($string)
Параметры:
  • $stringstring, array
Результат:

string - binary string

fs
php\lib\fs

File System class.

Class fs

Methods


static separator

Return the local filesystem’s name-separator character.

Результат:string
static pathSeparator

Return the local filesystem’s path-separator character.

Результат:string
static valid($name)

Validate file name.

Параметры:
  • $name
Результат:

bool

static abs($path)

Returns absolute real path.

Параметры:
  • $path
Результат:

string

static name($path)
Параметры:
  • $path
Результат:

string

static nameNoExt($path)
Параметры:
  • $path
Результат:

string

static pathNoExt($path)

Returns path without extension.

Параметры:
  • $pathstring
Результат:

string

static ext($path)

Returns extension of path.

Параметры:
  • $path
Результат:

string

static hasExt($path, $extensions = null, $ignoreCase = true)

Check that $path has an extension from the extension set.

Параметры:
  • $pathstring
  • $extensionsstring, array
  • $ignoreCasebool
Результат:

bool

static parent($path)

Returns parent directory.

Параметры:
  • $path
Результат:

string

static ensureParent($path)

Checks parent of path and if it is not exists, tries to create parent directory. See makeDir().

Параметры:
  • $pathstring
Результат:

bool

static normalize($path)

Normalizes file path for current OS.

Параметры:
  • $path
Результат:

string

static exists($path)
Параметры:
  • $path
Результат:

string

static size($path)

Returns size of file in bytes.

Параметры:
  • $path
Результат:

int

static isFile($path)
Параметры:
  • $path
Результат:

bool

static isDir($path)
Параметры:
  • $path
Результат:

bool

static isHidden($path)
Параметры:
  • $path
Результат:

bool

static time($path)

Returns last modification time of file or directory.

Параметры:
  • $path
Результат:

int

static makeDir($path)

Creates empty directory (mkdirs) if not exists.

Параметры:
  • $path
Результат:

bool

static makeFile($path)

Creates empty file, if file already exists then rewrite it.

Параметры:
  • $path
Результат:

bool

static delete($path)

Deletes file or empty directory.

Параметры:
  • $path
Результат:

bool

static clean($path, $checker = null)

Deletes all files in path. This method does not delete the $path directory. Returns array with error, success and skip file list.

Параметры:
  • $pathstring
  • $checkercallable - (File $file, $depth) optional, must return true to delete the file.
Результат:

array [success => [], error => [], skip = []]

static scan($path, $onProgress, $maxDepth = 0, $subIsFirst = false)
Параметры:
  • $pathstring
  • $onProgresscallable - (File $file, $depth)
  • $maxDepthint - if 0 then unlimited.
  • $subIsFirstbool
static hash($source, $algo = 'MD5')

Calculates hash of file or stream.

Параметры:
  • $sourcestring, php\io\Stream
  • $algostring - MD5, MD2, SHA-1, SHA-256, SHA-512
Результат:

string

static copy($source, $dest, $onProgress = null)

Copies $source stream to $dest stream.

Параметры:
Результат:

int copied bytes.

static get($source, $charset = null, $mode = 'r')

Reads fully data from source and returns it as binary string.

Параметры:
  • $sourcestring
  • $charsetnull, string - UTF-8, windows-1251, etc.
  • $modestring
Результат:

string

num
php\lib\num

Utils for numbers

Class num

Methods


__construct()

private

static compare($num1, $num2)

Compare two numbers

Примечание

it can be used as comparator for number sorting

Параметры:
  • $num1int, double
  • $num2int, double
Результат:

int 0 if are equal, 1 if $num1 > $num2, -1 if $num1 < $num2

static toBin($number)

Returns a string representation of the $number argument as an unsigned integer in base 2.

Параметры:
  • $numberint
Результат:

string

static toOctal($number)

Returns a string representation of the $number argument as an unsigned integer in base 8.

Параметры:
  • $numberint
Результат:

string

static toHex($number)

Returns a string representation of the $number argument as an unsigned integer in base 16.

Параметры:
  • $numberint
Результат:

string

static toString($number, $radix)

Returns a string representation of the first argument in the radix specified by the second argument.

Параметры:
  • $numberint
  • $radixint
Результат:

string

static reverse($number)

Returns the value obtained by reversing the order of the bits in the two’s complement binary representation of the specified {@code long} value.

Параметры:
  • $numberint
Результат:

int

static decode($string)

Decodes a string into a integer. Accepts decimal, hexadecimal, and octal numbers

Параметры:
  • $stringstring
Результат:

string or false if invalid number format

static format($number, $pattern, $decSep = '.', $groupSep = ', ')
Параметры:
  • $numberint, double
  • $pattern
  • $decSepstring
  • $groupSepstring
Результат:

string

reflect
php\lib\reflect

Class reflect

Methods


__construct()

private

static typeOf($object, $isLowerCase = false)
Параметры:
  • $objectobject
  • $isLowerCasebool - (optional)
Результат:

php\lib\false, string

static typeModule($typeName)
Параметры:
  • $typeNamestring
Результат:

php\lang\Module, null

static functionModule($funcName)
Параметры:
  • $funcNamestring
Результат:

php\lang\Module, null

static newInstance($className, $args = null, $withConstruct = true)
Параметры:
  • $classNamestring
  • $argsarray
  • $withConstructbool
Результат:

object

str
php\lib\str

Class str

Methods


__construct()

private

static pos($string, $search, $fromIndex = 0)

Returns the index within this string of the first occurrence of the specified substring, starting at the specified index.

Параметры:
  • $stringstring
  • $searchstring - the substring to search for
  • $fromIndexint - the index from which to start the search.
Результат:

int - returns -1 if not found

static posIgnoreCase($string, $search, $fromIndex = 0)

The same method as pos() only with ignoring case characters

Параметры:
  • $stringstring
  • $searchstring - the substring to search for.
  • $fromIndexint - the index from which to start the search.
Результат:

int - returns -1 if not found

static lastPos($string, $search, $fromIndex = null)

Returns the index within this string of the last occurrence of the specified substring. The last occurrence of the empty string “” is considered to occur at the index value $string.length.

Параметры:
  • $stringstring
  • $searchstring - the substring to search for.
  • $fromIndexnull, int - - null means $fromIndex will be equal $string.length
Результат:

int - returns -1 if not found

static lastPosIgnoreCase($string, $search, $fromIndex = null)

The same method as lastPos() only with ignoring case characters

Параметры:
  • $stringstring
  • $searchstring - the substring to search for.
  • $fromIndexnull, int - - null means $fromIndex will be equal $string.length
Результат:

int

static sub($string, $beginIndex, $endIndex = null)

Returns a new string that is a substring of this string. The substring begins at the specified $beginIndex and extends to the character at index $endIndex - 1. Thus the length of the substring is endIndex - beginIndex.

Параметры:
  • $stringstring
  • $beginIndexint
  • $endIndexnull, int - When $endIndex equals to null then it will be equal $string.length
Результат:

string - return false if params are invalid

static compare($string1, $string2)

Compares two strings lexicographically. The comparison is based on the Unicode value of each character in the strings.

The character sequence represented by $string1 String is compared lexicographically to the character sequence represented by $string2. The result is a negative integer if $string1 lexicographically precedes $string2. The result is a positive integer if $string1 lexicographically follows $string2. The result is zero if the strings are equal; compare returns 0 exactly when the strings are equal

Параметры:
  • $string1string - - first string
  • $string2string - - second string
Результат:

int

static compareIgnoreCase($string1, $string2)

The same method as compare() only with ignoring case characters

Параметры:
  • $string1string
  • $string2string
Результат:

int

static equalsIgnoreCase($string1, $string2)

Checks that the strings are equal with ignoring case characters

Параметры:
  • $string1string
  • $string2string
Результат:

bool

static startsWith($string, $prefix, $offset = 0)

Tests if the substring of this string beginning at the specified index starts with the specified prefix.

Returns `true if the character sequence represented by the argument is a prefix of the substring of this object starting at index offset; false otherwise. The result is false if toffset is negative or greater than the length of this $string; otherwise the result is the same as the result of the expression


startsWith(sub($offset), $prefix)

Параметры:
  • $stringstring
  • $prefixstring
  • $offsetint - where to begin looking in this string
Результат:

bool

static endsWith($string, $suffix)

Tests if this string ends with the specified suffix.

Параметры:
  • $stringstring
  • $suffixstring
Результат:

bool

static lower($string)

Converts all of the characters in $string to lower case using the rules of the default locale.

Параметры:
  • $stringstring
Результат:

string

static upper($string)

Converts all of the characters in $string to upper case using the rules of the default locale.

Параметры:
  • $stringstring
Результат:

string

static length($string)

Returns the length of $string. The length is equal to the number of Unicode code units in the string.

Параметры:
  • $stringstring
Результат:

int

static replace($string, $target, $replacement)

Replaces each substring of this string that matches the literal target sequence with the specified literal replacement sequence. The replacement proceeds from the beginning of the string to the end, for example, replacing “aa” with “b” in the string “aaa” will result in “ba” rather than “ab”.

Параметры:
  • $stringstring
  • $targetstring - The sequence of char values to be replaced
  • $replacementstring - The replacement sequence of char values
Результат:

string

static repeat($string, $amount)

Return s a new string consisting of the original $string repeated

Параметры:
  • $stringstring
  • $amountint - number of times to repeat str
Результат:

string

trim($string, $charList = '

‘)

Returns a copy of the string, with leading and trailing whitespace omitted.

param $string:string
param $charList:
 string
returns:string
trimRight($string, $charList = '

‘)

param $string:string
param $charList:
 string
returns:string
trimLeft($string, $charList = '

‘)

param $string:string
param $charList:
 string
returns:string
static reverse($string)
Параметры:
  • $stringstring
Результат:

string

static shuffle($string)

Returns a randomized string based on chars in $string

Параметры:
  • $stringstring
Результат:

string

static random($length = 16, $set = 'qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM0123456789')
Параметры:
  • $lengthint
  • $setstring
Результат:

string

static split($string, $separator, $limit = 0)

The method like explode() in Zend PHP

Параметры:
  • $stringstring
  • $separatorstring
  • $limitint
Результат:

array

static join($iterable, $separator, $limit = 0)

The method like implode() in Zend PHP

Параметры:
  • $iterablearray, php\lib\\Iterator
  • $separatorstring
  • $limitint
Результат:

string

static encode($string, $charset)

Converts $string by using $charset and returns a binary string

Параметры:
  • $stringstring
  • $charsetstring - e.g. UTF-8, Windows-1251, etc.
Результат:

string binary string

static decode($string, $charset)

Decodes $string by using $charset to UNICODE, returns a unicode string

Параметры:
  • $stringstring
  • $charsetstring - e.g. UTF-8, Windows-1251, etc.
Результат:

string binary string

static isNumber($string, $bigNumbers = true)

Returns true if $string is integer number (e.g: ‘12893’, ‘3784’, ‘0047’)

  • for 123 - true
  • for 00304 - true
  • for 3389e4 - false
  • for 3.49 - false
  • for ``23 `` - false
Параметры:
  • $stringstring
  • $bigNumbersbool
Результат:

bool

static isLower($string)
Параметры:
  • $stringstring
Результат:

bool

static isUpper($string)
Параметры:
  • $string
Результат:

bool

static lowerFirst($string)
Параметры:
  • $stringstring
Результат:

string

static upperFirst($string)
Параметры:
  • $stringstring
Результат:

string

static format($string, $args)
Параметры:
  • $stringstring
  • $args
Результат:

string

static contains($string, $search)
Параметры:
  • $stringstring
  • $searchstring
Результат:

bool

static count($string, $subString, $offset = 0)
Параметры:
  • $stringstring
  • $subStringstring
  • $offsetint
Результат:

int

static uuid($value = null)
Параметры:
  • $valuenull, string
Результат:

string uuid of $value if it is not null, else random uuid

static hash($string, $algorithm = 'SHA-1')

throws php\lib\\Exception if the algorithm is not supported

Параметры:
  • $stringstring
  • $algorithmstring - MD5, SHA-1, SHA-256, etc.
Результат:

string

mail

Email
php\mail\Email

Class Email

Methods


setFrom($email, $name, $charset)
Параметры:
  • $emailstring
  • $namestring - (optional)
  • $charsetstring - (optional)
Результат:

php\mail\$this

setCharset($charset)
Параметры:
  • $charsetstring
Результат:

php\mail\$this

setSubject($subject)
Параметры:
  • $subjectstring
Результат:

php\mail\$this

setTo($addresses)
Параметры:
  • $addressesarray
Результат:

php\mail\$this

setCc($addresses)
Параметры:
  • $addressesarray
Результат:

php\mail\$this

setBcc($addresses)
Параметры:
  • $addressesarray
Результат:

php\mail\$this

setBounceAddress($email)
Параметры:
  • $emailarray
Результат:

php\mail\$this

setHeaders($headers)
Параметры:
  • $headersarray
Результат:

php\mail\$this

setMessage($message)
Параметры:
  • $messagestring
Результат:

php\mail\$this

setHtmlMessage($message)
Параметры:
  • $messagestring
Результат:

php\mail\$this

setTextMessage($message)
Параметры:
  • $messagestring
Результат:

php\mail\$this

attach($content, $contentType, $name, $description = '')
Параметры:
Результат:

php\mail\$this

send($backend)

Sends the email. Internally we build a MimeMessage which is afterwards sent to the SMTP server.

Параметры:
Результат:

string the message id of the underlying MimeMessage

EmailBackend
php\mail\EmailBackend

Class EmailBackend

Properties


property hostName

string

The host name of the SMTP server.

property smtpPort

string

The listening port of the SMTP server.

property sslSmtpPort

string

The current SSL port used by the SMTP transport.

property sendPartial

bool

Sending partial email.

property socketTimeout

int

The socket I/O timeout value in milliseconds.

property socketConnectionTimeout

int

The socket connection timeout value in milliseconds.

property sslOnConnect

bool

Whether SSL/TLS encryption for the transport is currently enabled (SMTPS/POPS).

property sslCheckServerIdentity

bool

Whether the server identity is checked as specified by RFC 2595.

Methods


getHostName()

protected

Результат:string
setHostName($hostName)

protected

Параметры:
  • $hostNamestring
getSmtpPort()

protected

Результат:string
setSmtpPort($smtpPort)

protected

Параметры:
  • $smtpPortstring
getSslSmtpPort()

protected

Результат:string
setSslSmtpPort($sslSmtpPort)

protected

Параметры:
  • $sslSmtpPortstring
isSendPartial()

protected

Результат:boolean
setSendPartial($sendPartial)

protected

Параметры:
  • $sendPartialboolean
getSocketTimeout()

protected

Результат:int
setSocketTimeout($socketTimeout)

protected

Параметры:
  • $socketTimeoutint
getSocketConnectionTimeout()

protected

Результат:int
setSocketConnectionTimeout($socketConnectionTimeout)

protected

Параметры:
  • $socketConnectionTimeoutint
isSslOnConnect()

protected

Результат:boolean
setSslOnConnect($sslOnConnect)

protected

Параметры:
  • $sslOnConnectboolean
isSslCheckServerIdentity()

protected

Результат:boolean
setSslCheckServerIdentity($sslCheckServerIdentity)

protected

Параметры:
  • $sslCheckServerIdentityboolean
setAuthentication($login, $password)

Sets the userName and password if authentication is needed. If this method is not used, no authentication will be performed.

Параметры:
  • $loginstring
  • $passwordstring
clearAuthentication()

net

NetStream
php\net\NetStream

extends: php\io\Stream

http, ftp protocols

Class NetStream

Methods


read($length)
Параметры:
  • $length
readFully($bufferSize = 4096)
Параметры:
  • $bufferSizeint
Результат:

mixed, void

readFullyWithCallback($bufferSize, $callback)
Параметры:
  • $bufferSizeint
  • $callbackcallable - (NetStream $this, $len)
write($value, $length = null)
Параметры:
  • $value
  • $length
eof()
seek($position)
Параметры:
  • $position
getPosition()
close()
getUrl()
Результат:php\net\URL
setProxy($proxy)
Параметры:
getProxy()
Результат:php\net\Proxy
getUrlConnection()
Результат:php\net\URLConnection
Proxy
php\net\Proxy

Class Proxy

Methods


__construct($type, $host, $port)
Параметры:
  • $typestring - - DIRECT, HTTP or SOCKS
  • $hoststring
  • $portint
address()
Результат:string host with port
type()
Результат:string DIRECT, HTTP or SOCKS
ServerSocket
php\net\ServerSocket

Class SocketServer

Methods


__construct($port = null, $backLog = 50)
Параметры:
  • $portint
  • $backLogint
accept()

throws php\io\IOException

Результат:php\net\Socket
bind($hostname, $port, $backLog = 50)

throws php\net\SocketException

Параметры:
  • $hostnamestring
  • $portint
  • $backLogint
close()

throws php\io\IOException

isClosed()
Результат:bool
isBound()

Returns the binding state of the ServerSocket.

Результат:bool
setSoTimeout($timeout)

Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds.

throws php\net\SocketException

Параметры:
  • $timeoutint
setReuseAddress($on)

Enable/disable the SO_REUSEADDR socket option.

throws php\net\SocketException

Параметры:
  • $onbool
setReceiveBufferSize($size)

throws php\net\SocketException

Параметры:
  • $sizeint
setPerformancePreferences($connectTime, $latency, $bandWidth)

Sets performance preferences for this ServerSocket.

! Not implemented yet for TCP/IP

Параметры:
  • $connectTimeint
  • $latencyint
  • $bandWidthint
static findAvailableLocalPort
Результат:int
Socket
php\net\Socket

Class Socket

Methods


__construct($host = null, $port = null)
Параметры:
  • $hostnull, string
  • $portnull, int
getOutput()

throws php\io\IOException

Результат:php\io\MiscStream
getInput()

throws php\io\IOException

Результат:php\io\MiscStream
getLocalAddress()
Результат:string
getAddress()
Результат:string
getLocalPort()
Результат:int
getPort()
Результат:int
close()

throws php\io\IOException

shutdownInput()

throws php\io\IOException

shutdownOutput()

throws php\io\IOException

isConnected()
Результат:bool
isClosed()
Результат:bool
isBound()
Результат:bool
isInputShutdown()
Результат:bool
isOutputShutdown()
Результат:bool
connect($hostname, $port, $timeout = null)

Connects this socket to the server

Параметры:
  • $hostnamestring
  • $portint
  • $timeoutnull, int
bind($hostname, $port)

Binds the socket to a local address.

throws php\net\SocketException

Параметры:
  • $hostnamestring
  • $portint
bindDefault()
setSoTimeout($timeout)

Enable/disable SO_TIMEOUT with the specified timeout, in milliseconds.

throws php\net\SocketException

Параметры:
  • $timeoutint
setSoLinger($on, $linger)

throws php\net\SocketException

Параметры:
  • $onbool
  • $lingerint
setReuseAddress($on)

Enable/disable the SO_REUSEADDR socket option.

throws php\net\SocketException

Параметры:
  • $onbool
setReceiveBufferSize($size)

throws php\net\SocketException

Параметры:
  • $sizeint
setTcpNoDelay($on)

throws php\net\SocketException

Параметры:
  • $onbool
setKeepAlive($on)

throws php\net\SocketException

Параметры:
  • $onbool
setOOBInline($on)

throws php\net\SocketException

Параметры:
  • $onbool
setSendBufferSize($size)

throws php\net\SocketException

Параметры:
  • $sizeint
setTrafficClass($tc)

Sets traffic class or type-of-service octet in the IP header for packets sent from this Socket.

Параметры:
  • $tcint
setPerformancePreferences($connectTime, $latency, $bandWidth)

Sets performance preferences for this ServerSocket.

! Not implemented yet for TCP/IP

Параметры:
  • $connectTimeint
  • $latencyint
  • $bandWidthint
sendUrgentData($data)

Send one byte of urgent data on the socket. The byte to be sent is the lowest eight bits of the data parameter.

throws php\net\SocketException

Параметры:
  • $dataint
SocketException
php\net\SocketException

extends: php\lang\JavaException

Class SocketException

URL
php\net\URL

Class URL

Methods


__construct($uri)
Параметры:
  • $uristring
openConnection($proxy)
Параметры:
Результат:

php\net\URLConnection

getAuthority()

Gets the authority part of this URL

Результат:string
getPort()
Результат:int
getDefaultPort()

Gets the default port number of the protocol associated with this URL. If the URL scheme or the URLStreamHandler for the URL do not define a default port number, then -1 is returned.

Результат:int
getProtocol()

Gets the protocol name of this URL

Результат:string
getHost()
Результат:string
getFile()

Gets the file name of this <code>URL</code>. The returned file portion will be the same as getPath(), plus the concatenation of the value of getQuery(), if any. If there is no query portion, this method and getPath() will return identical results.

Результат:string
getPath()
Результат:string
getQuery()
Результат:string
getRef()

Gets the anchor (also known as the “reference”) of this URL

Результат:string
sameFile($url)

Compares two URLs, excluding the fragment component.

Параметры:
Результат:

bool

toString()
Результат:string
toExternalForm()

Constructs a string representation of this URL. The string is created by calling the toExternalForm method of the stream protocol handler for this object.

Результат:string
openStream()
Результат:php\io\Stream
__toString()
Результат:string
URLConnection
php\net\URLConnection

Class URLConnection

Properties


property doOutput

bool

property doInput

bool

property requestMethod

string

POST, GET, PUT, etc.

property connectTimeout

php\net\int millis

that specifies the connect timeout value in milliseconds

property readTimeout

php\net\int millis

the read timeout to a specified timeout, in milliseconds.

property useCaches

bool

property ifModifiedSince

php\net\int millis

property followRedirects

bool

property url

php\net\URL

read-only

property responseCode

int

read-only

property responseMessage

int

read-only

property contentLength

php\net\int bytes

read-only

int the content length of the resource that this connection’s URL references, -1 if the content length is not known, or if the content length is greater than Integer.MAX_VALUE.

property contentType

string

read-only

property contentEncoding

string

read-only

property expiration

int

read-only

property lastModified

int

read-only

property usingProxy

bool

read-only

Methods


__construct($parent)

protected

Параметры:
connect()
getHeaderField($name)
Параметры:
  • $namestring
getHeaderFields()
Результат:array
getInputStream()
Результат:php\io\Stream
getErrorStream()
Результат:php\io\Stream
getOutputStream()
Результат:php\io\Stream
setRequestProperty($name, $value)
Параметры:
  • $namestring
  • $valuestring
getRequestProperty($name)
Параметры:
  • $namestring
getRequestProperties()
Результат:array
disconnect()
setChunkedStreamingMode($chunklen)

This method is used to enable streaming of a HTTP request body without internal buffering, when the content length is <b>not</b> known in advance. In this mode, chunked transfer encoding is used to send the request body. Note, not all HTTP servers support this mode.

Параметры:
  • $chunklenint - The number of bytes to write in each chunk.

If chunklen is less than or equal to zero, a default value will be used.

static guessContentTypeFromStream($stream)

Tries to determine the type of an input stream based on the characters at the beginning of the input stream. This method can be used by subclasses that override the <code>getContentType</code> method.

Параметры:
Результат:

string

static guessContentTypeFromName($name)
Параметры:
  • $namestring
static create($url, $proxy = null)
Параметры:
Результат:

php\net\URLConnection

orientdb

ODatabase
php\orientdb\ODatabase

Class ODatabase

Properties


property name

string

read-only

property url

string

read-only

property size

int

read-only

property status

string

read-only

OPEN, CLOSED, IMPORTING

property type

string

Methods


__construct($uri)
Параметры:
  • $uristring
setUser($name)
Параметры:
  • $namestring
setUserAndPassword($name, $password)
Параметры:
  • $namestring
  • $passwordstring
exists()
Результат:bool
create()
drop()
open($username, $password)

Open database

Параметры:
  • $usernamestring
  • $passwordstring
close()
reload()
freeze()
release()
begin()
commit($force = false)
Параметры:
  • $forcebool
rollback($force = false)
Параметры:
  • $forcebool
getDocuments($className)
Параметры:
  • $className
Результат:

php\util\Flow of ODocument

query($query, $limit = -1)
Параметры:
  • $querystring - like sql.
  • $limitint
Результат:

php\util\Flow of ODocument

command($query)
Параметры:
  • $querystring
Результат:

int

ODocument
php\orientdb\ODocument

Class ODocument

Properties


property id

string

read-only

Methods


__construct($className)
Параметры:
  • $classNamestring
isNew()
Результат:bool
resetId()
save()
delete()
clear()
reset()
undo($field)

Undo changes.

Параметры:
  • $field
    • (optional)
load()
reload()
toJson()
Результат:string
fromJson($json)
Параметры:
  • $jsonstring
__set($name, $value)
Параметры:
  • $name
  • $value
__get($name)
Параметры:
  • $name
__isset($name)
Параметры:
  • $name
__unset($name)
Параметры:
  • $name
__clone()

sql

SqlConnection
php\sql\SqlConnection

abstract class

Constants


constant TRANSACTION_READ_UNCOMMITTED
constant TRANSACTION_READ_COMMITTED
constant TRANSACTION_REPEATABLE_READ
constant TRANSACTION_NONE
constant TRANSACTION_SERIALIZABLE

Properties


property autoCommit

bool

Disable this to use transaction mode.

property readOnly

bool

property transactionIsolation

int

See SqlConnection::TRANSACTION_* constants

property catalog

string

property schema

string

Methods


identifier($name)

throws php\sql\SqlException

Параметры:
  • $namestring
Результат:

string

query($sql, $arguments = null)
Параметры:
  • $sqlstring
  • $argumentsarray
Результат:

php\sql\SqlStatement

commit()

Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by this Connection object.

throws php\sql\SqlException

rollback()

Undoes all changes made in the current transaction and releases any database locks currently held by this Connection object.

throws php\sql\SqlException

close()

throws php\sql\SqlException

getCatalogs()
Результат:array
getSchemas()
Результат:array
getMetaData()
Результат:array
SqlConnectionPool
php\sql\SqlConnectionPool

Class SqlConnectionPool

Methods


__construct($parent)

protected

Параметры:
getConnection()
Результат:php\sql\SqlConnection
setUser($username)
Параметры:
  • $usernamestring
Результат:

php\sql\$this

setPassword($password)
Параметры:
  • $passwordstring
Результат:

php\sql\$this

setMaxPoolSize($value)
Параметры:
  • $valueint
Результат:

php\sql\$this

setIdleTimeout($millis)
Параметры:
  • $millisint
Результат:

php\sql\$this

setMaxLifetime($millis)
Параметры:
  • $millisint
Результат:

php\sql\$this

setMinimumIdle($millis)
Параметры:
  • $millisint
Результат:

php\sql\$this

SqlDriverManager
php\sql\SqlDriverManager

Class DriverManager

Methods


static install($driverName)

throws php\sql\SqlException if cannot install or find driver.

Параметры:
  • $driverNamestring - - mysql, pgsql, postgres, mssql, firebird, sybase, sqlite, etc.
static getConnection($url, $options)

throws php\sql\SqlException if a database access error occurs

Параметры:
  • $urlstring
  • $optionsarray - (optional) username, password, etc.
Результат:

php\sql\SqlConnection

static getPool($url, $driverName, $options)
Параметры:
  • $urlstring
  • $driverNamestring - - mysql, pgsql, postgres, mssql, firebird, sybase, sqlite, etc.
  • $optionsarray - (optional)
Результат:

php\sql\SqlConnectionPool

SqlException
php\sql\SqlException

extends: php\lang\JavaException

Class SqlException

SqlResult
php\sql\SqlResult

abstract class

Methods


isLast()

throws php\sql\SqlException

Результат:bool
isFirst()

throws php\sql\SqlException

Результат:bool
delete()

Deletes current row.

throws php\sql\SqlException

isDeleted()

throws php\sql\SqlException

Результат:bool
refresh()

throws php\sql\SqlException

get($column)

throws php\sql\SqlException

Параметры:
  • $columnstring
Результат:

mixed, php\io\Stream, php\time\Time

toArray($assoc = true)

throws php\sql\SqlException

Параметры:
  • $assocbool
Результат:

array

SqlStatement
php\sql\SqlStatement

abstract class

implements: Iterator

Methods


bind($index, $value)
Параметры:
  • $indexint
  • $valuemixed
bindDate($index, $time)
Параметры:
bindTime($index, $time)
Параметры:
bindTimestamp($index, $time)
Параметры:
bindBlob($index, $blob)
Параметры:
fetch()

throws php\sql\SqlException

Результат:php\sql\SqlResult
update()

throws php\sql\SqlException

Результат:int
getLastInsertId()
Результат:mixed
getGeneratedKeys()
Результат:php\sql\SqlResult
current()
Результат:php\sql\SqlResult
next()
key()
valid()
rewind()

swing

Border
php\swing\Border

Class Border

Methods


isOpaque()
Результат:bool
static createEmpty($top, $left, $bottom, $right)
Параметры:
  • $topint
  • $leftint
  • $bottomint
  • $rightint
Результат:

php\swing\Border

static createBevel($type, $highlightColor, $shadowColor)
Параметры:
Результат:

php\swing\Border

static createSoftBevel($type, $highlightColor, $shadowColor)
Параметры:
Результат:

php\swing\Border

static createEtchedBevel($type, $highlightColor, $shadowColor)
Параметры:
Результат:

php\swing\Border

static createTitled($title, $border = null, $titleFont = null, $titleColor = null)
Параметры:
Результат:

php\swing\Border

static createLine($color, $size = 1, $rounded = false)
Параметры:
Результат:

php\swing\Border

static createDashed($color, $thickness = 1, $length = 2, $spacing = 1, $rounded = false)
Параметры:
  • $colorphp\swing\Color, array, int
  • $thicknessint
  • $lengthint
  • $spacingint
  • $roundedbool
Результат:

php\swing\Border

Color
php\swing\Color

Properties


property rgb

int

read-only

property alpha

int

read-only

property red

int

read-only

property green

int

read-only

property blue

int

read-only

Methods


__construct($rgb, $hasAlpha = false)
Параметры:
  • $rgbint
  • $hasAlphabool
darker()

Creates a new Color that is a darker version of this

Результат:php\swing\Color
brighter()

Creates a new Color that is a brighter version of this

Результат:php\swing\Color
static rgb($r, $g, $b, $alpha = 255)
Параметры:
  • $rint - - 0 .. 255
  • $gint - - 0 .. 255
  • $bint - - 0 .. 255
  • $alphaint - - 0 .. 255
Результат:

php\swing\Color

static floatRgb($r, $g, $b, $alpha = 1.0)
Параметры:
  • $rdouble - - between 0 and 1
  • $gdouble - - between 0 and 1
  • $bdouble - - between 0 and 1
  • $alphadouble - - between 0 and 1
Результат:

php\swing\Color

static decode($nm)

Decode color from a hex string (#RGB, 0xRGB, etc...)

Параметры:
  • $nm
Результат:

php\swing\Color

event
CaretEvent
php\swing\event\CaretEvent

Events:

  • caretUpdate

Class CaretEvent

Properties


property dot

int

read-only

property mark

int

read-only

property target

php\swing\UIElement

read-only

ComponentEvent
php\swing\event\ComponentEvent

abstract class

Children


Properties


property target

php\swing\UIElement

read-only

FocusEvent
php\swing\event\FocusEvent

extends: php\swing\event\ComponentEvent

Events:

  • focus
  • blur

Class FocusEvent

Properties


property temporary

bool

read-only

property paramString

string

read-only

HyperlinkEvent
php\swing\event\HyperlinkEvent

extends: php\swing\event\SimpleEvent

Class HyperlinkEvent

Properties


property url

string

read-only

property description

string

read-only

property attributes

string[]

read-only

ItemEvent
php\swing\event\ItemEvent

Events:

  • changed

Class CaretEvent

Properties


property item

string

read-only

property target

php\swing\UIElement

read-only

Methods


isSelected()
Результат:bool
isDeselected()
Результат:bool
KeyEvent
php\swing\event\KeyEvent

extends: php\swing\event\ComponentEvent

Events:

  • keyUp
  • keyDown
  • keyPress

Class KeyEvent

Properties


property keyChar

string

read-only

property keyCode

int

read-only

property keyLocation

int

read-only

property actionKey

bool

read-only

MouseEvent
php\swing\event\MouseEvent

extends: php\swing\event\ComponentEvent

Children


Events:

  • click
  • mousePress
  • mouseRelease
  • mouseEnter
  • mouseExit
  • mouseDrag
  • mouseMove

Class MouseEvent

Properties


property x

int

read-only

property y

int

read-only

property screenX

int

read-only

property screenY

int

read-only

property button

int

read-only

property clickCount

int

read-only

property popupTrigger

bool

read-only

MouseWheelEvent
php\swing\event\MouseWheelEvent

extends: php\swing\event\MouseEvent

Events:

  • mouseWheel

Class MouseWheelEvent

Properties


property scrollAmount

int

read-only

property scrollType

int

read-only

property wheelRotation

int

read-only

property unitsToScroll

int

read-only

SimpleEvent
php\swing\event\SimpleEvent

Class SimpleEvent

Properties


property target

php\swing\UIElement

read-only

WindowEvent
php\swing\event\WindowEvent

extends: php\swing\event\ComponentEvent

Events:

  • windowOpen
  • windowClose
  • windowClosing
  • windowActive

Class WindowEvent

Properties


property oldState

int

read-only

property newState

int

read-only

property oppositeWindow

php\swing\UIWindow

read-only

Font
php\swing\Font

Constants


constant PLAIN
constant BOLD
constant ITALIC

Properties


property family

string

read-only

Family name of font

property fontName

string

read-only

property name

string

read-only

property psName

string

read-only

PostScript name of font

property size

int

read-only

property size2D

int

read-only

property style

int

read-only

property italicAngle

double

read-only

property attributes

string[]

read-only

property numGlyphs

int

read-only

Methods


__construct($name, $style, $size)
Параметры:
  • $namestring
  • $styleint - - PLAIN, BOLD, ITALIC
  • $sizeint
isBold()
Результат:bool
isItalic()
Результат:bool
isPlain()
Результат:bool
isTransformed()
Результат:bool
getBaselineFor($symbol)
Параметры:
  • $symbolstring - - one char
Результат:

int

canDisplay($symbol)
Параметры:
  • $symbolstring - - one char
Результат:

bool

canDisplayUpTo($string)

Indicates whether or not this Font can display a specified String.

Параметры:
  • $stringstring
Результат:

int - an offset into $string that points to the first character in $string that this

Font cannot display; or -1 if this Font can display all characters in $string.

static decode($str)

Decode font by using a specified string

Параметры:
  • $strstring
Результат:

php\swing\Font

static create($source, $trueType = true)

Create new font by using Stream or File

throws php\io\IOException

throws php\swing\\Exception

Параметры:
Результат:

php\swing\Font

static get($name)

Get font by name

Параметры:
  • $namestring
Результат:

php\swing\Font, null - return null if not exists

Graphics
php\swing\Graphics

Class Graphics

Properties


property color

php\swing\Color

Foreground color

property font

php\swing\Font

Font of text

Methods


__construct()

private

getTextWidth($str)

Return width of str for drawText + current font

Параметры:
  • $str
Результат:

int

getTextHeight()

Return height of one line text with current font

Результат:int
setPaintMode()
drawLine($x1, $y1, $x2, $y2)

Draw line

Параметры:
  • $x1int
  • $y1int
  • $x2int
  • $y2int
drawRect($x, $y, $width, $height)

Draw rect

Параметры:
  • $xint
  • $yint
  • $widthint
  • $heightint
fillRect($x, $y, $width, $height)
Параметры:
  • $xint
  • $yint
  • $widthint
  • $heightint
draw3DRect($x, $y, $width, $height, $raised)

Draws a 3-D highlighted outline of the specified rectangle.

Параметры:
  • $xint
  • $yint
  • $widthint
  • $heightint
  • $raised
fill3DRect($x, $y, $width, $height, $raised)
Параметры:
  • $xint
  • $yint
  • $widthint
  • $heightint
  • $raised
drawOval($x, $y, $width, $height)

Draw oval

Параметры:
  • $xint
  • $yint
  • $widthint
  • $heightint
fillOval($x, $y, $width, $height)
Параметры:
  • $xint
  • $yint
  • $widthint
  • $heightint
drawArc($x, $y, $width, $height, $startAngle, $arcAngle)
Параметры:
  • $xint
  • $yint
  • $widthint
  • $heightint
  • $startAngleint
  • $arcAngleint
fillArc($x, $y, $width, $height, $startAngle, $arcAngle)
Параметры:
  • $xint
  • $yint
  • $widthint
  • $heightint
  • $startAngleint
  • $arcAngleint
drawPolygon($xy)
Параметры:
  • $xyarray - - [[x1, y1], [x2, y2], ... ]
fillPolygon($xy)
Параметры:
  • $xyarray - - [[x1, y1], [x2, y2], ... ]
drawPolyline($xy)
Параметры:
  • $xyarray - - [[x1, y1], [x2, y2], ... ]
drawImage($image, $x = 0, $y = 0, $newWidth = null, $newHeight = null)
Параметры:
  • $imagephp\swing\Image
  • $xint
  • $yint
  • $newWidthnull, int
  • $newHeightnull, int
drawText($text, $x, $y)
Параметры:
  • $textstring
  • $xint
  • $yint
clipRect($x, $y, $width, $height)

Intersects the current clip with the specified rectangle.

Параметры:
  • $xint
  • $yint
  • $widthint
  • $heightint
clearRect($x, $y, $width, $height)

Clears the specified rectangle by filling it with the background color of the current drawing surface.

Параметры:
  • $xint
  • $yint
  • $widthint
  • $heightint
setXORMode($color)
Параметры:
translate($x, $y)

Translates the origin of the graphics context to the point (x, y) in the current coordinate system.

Параметры:
  • $xint
  • $yint
copyArea($x, $y, $width, $height, $dx, $dy)

Copies an area of the component by a distance specified by $dx and $dy

Параметры:
  • $xint
  • $yint
  • $widthint
  • $heightint
  • $dxint
  • $dyint
create($x = null, $y = null, $w = null, $h = null)

Create new copy Graphics from this

Параметры:
  • $xint, null
  • $yint, null
  • $wint, null
  • $hint, null
Результат:

php\swing\Graphics

dispose()
Image
php\swing\Image

Constants


constant TYPE_INT_RGB
constant TYPE_INT_ARGB
constant TYPE_INT_ARGB_PRE
constant TYPE_INT_BGR
constant TYPE_3BYTE_BGR
constant TYPE_4BYTE_ABGR
constant TYPE_4BYTE_ABGR_PRE
constant TYPE_USHORT_565_RGB
constant TYPE_USHORT_555_RGB
constant TYPE_BYTE_GRAY
constant TYPE_USHORT_GRAY
constant TYPE_BYTE_BINARY
constant TYPE_BYTE_INDEXED

Properties


property type

int

read-only

property width

int

read-only

property height

int

read-only

Methods


__construct($width, $height, $type = ::)
Параметры:
  • $widthint
  • $heightint
  • $typeint
getSubimage($x, $y, $w, $h)
Параметры:
  • $xint
  • $yint
  • $wint
  • $hint
Результат:

php\swing\Image

getRGB($x, $y)
Параметры:
  • $xint
  • $yint
Результат:

int

setRGB($x, $y, $rgb)
Параметры:
  • $xint
  • $yint
  • $rgbint - - color
getGraphics()
Результат:php\swing\Graphics
getProperty($name)
Параметры:
  • $name
Результат:

php\lang\JavaObject, null

static read($stream)

throws php\io\IOException

Параметры:
Результат:

php\swing\Image

static write($image, $format, $stream)

throws php\io\IOException

Параметры:
Scope
php\swing\Scope

Class Scope

Methods


static getDefault
Результат:php\swing\Scope
ScopeValue
php\swing\ScopeValue

final class

Methods


__construct()

private

getValue()
Результат:mixed
setValue($value)
Параметры:
  • $value
bind($object, $property)
Параметры:
  • $objectobject
  • $propertystring
static of($name)
Параметры:
  • $namestring
Результат:

php\swing\ScopeValue

SwingUtilities
php\swing\SwingUtilities

final class

Methods


__construct()

private

static getScreenSize

Returns screen size as an array [width, height]

Результат:array
static setExceptionHandler($handler)
Параметры:
  • $handlercallable - (Exception|JavaObject $exception)
static invokeLater($runner)
Параметры:
  • $runnercallable
SwingWorker
php\swing\SwingWorker

abstract class

Methods


doInBackground()

abstract

protected

Результат:mixed
get($timeout = -1)

throws php\concurrent\TimeoutException

throws php\lang\InterruptedException

Параметры:
  • $timeoutint
Результат:

mixed

getProgress()
Результат:int
setProgress($val)

protected

Параметры:
  • $valint
publish($values)

protected

Параметры:
  • $valuesarray
process($values)

protected

Параметры:
  • $valuesarray
isDone()
Результат:bool
isCanceled()
Результат:bool
getState()
Результат:string PENDING, STARTED, DONE
cancel($mayInterruptIfRunning)
Параметры:
  • $mayInterruptIfRunningbool
run()
execute()
text
Style
php\swing\text\Style

Class TextStyle

Properties


property background

php\swing\Color

property foreground

php\swing\Color

property bold

bool

Timer
php\swing\Timer

Properties


property repeat

bool

property delay

int

Delay in milliseconds for repeats

property initDelay

int

Initial Delay in milliseconds for first trigger

property actionCommand

string

User data

Methods


__construct($delay, $callback)
Параметры:
  • $delayint
  • $callbackcallable
start()
stop()
restart()
isRunning()
Результат:bool
tree
TreeModel
php\swing\tree\TreeModel

Class TreeModel

Properties


Methods


__construct($root, $askAllowsChildren = false)
Параметры:
nodeChanged($node)
Параметры:
nodeStructureChanged($node)
Параметры:
removeNodeFromParent($node)
Параметры:
reload($node = null)
Параметры:
TreeNode
php\swing\tree\TreeNode

Class TreeNode

Properties


property index

int

read-only

property depth

int

read-only

property level

int

read-only

property allowsChildren

bool

property parent

php\swing\tree\TreeNode

property userData

mixed

Methods


__construct($object = null, $allowsChildren = true)
Параметры:
  • $objectmixed
  • $allowsChildrenbool
isRoot()
Результат:bool
isLeaf()
Результат:bool
getRoot()
Результат:php\swing\tree\TreeNode
isNodeChild($node)
Параметры:
Результат:

bool

isNodeAncestor($node)
Параметры:
Результат:

bool

isNodeDescendant($node)
Параметры:
Результат:

bool

isNodeRelated($node)
Параметры:
Результат:

bool

isNodeSibling($node)
Параметры:
Результат:

bool

getNextNode()
Результат:php\swing\tree\TreeNode, null
getNextLeaf()
Результат:php\swing\tree\TreeNode, null
getNextSibling()
Результат:php\swing\tree\TreeNode, null
getPreviousNode()
Результат:php\swing\tree\TreeNode, null
getPreviousLeaf()
Результат:php\swing\tree\TreeNode, null
getPreviousSibling()
Результат:php\swing\tree\TreeNode, null
getFirstChild()
Результат:php\swing\tree\TreeNode, null
getFirstLeaf()
Результат:php\swing\tree\TreeNode, null
getLastChild()
Результат:php\swing\tree\TreeNode, null
getLastLeaf()
Результат:php\swing\tree\TreeNode, null
add($node)
Параметры:
insert($childIndex, $node)
Параметры:
insertAfter($child, $node)

throws >

Параметры:
insertBefore($child, $node)

throws >

Параметры:
remove($child)
Параметры:
removeByIndex($childIndex)
Параметры:
  • $childIndexint
removeAllChildren()
removeFromParent()
getIndex($node)
Параметры:
Результат:

int

getChild($index)
Параметры:
  • $indexint
Результат:

php\swing\tree\TreeNode, null

getChildCount()
Результат:int
duplicate()
Результат:php\swing\tree\TreeNode
UIAbstractIButton
php\swing\UIAbstractIButton

extends: php\swing\UIContainer

Children


Properties


property text

string

Text of button

property selected

bool

property verPosition

int

Direction

property horPosition

int

Direction

property verAlignment

int

Direction

property horAlignment

php\swing\int|string

Direction

property iconTextGap

int

property borderPainted

bool

property focusPainted

bool

property rolloverEnabled

bool

property contentAreaFilled

bool

property buttonGroup

string

Methods


setIcon($icon)
Параметры:
setDisabledIcon($icon)
Параметры:
setSelectedIcon($icon)
Параметры:
setPressedIcon($icon)
Параметры:
setRolloverIcon($icon)
Параметры:
setDisabledSelectedIcon($icon)
Параметры:
setRolloverSelectedIcon($icon)
Параметры:
doClick($pressTime = 68)
Параметры:
  • $pressTimeint - the time to “hold down” the button, in milliseconds
static getButtons($buttonGroup)
Параметры:
  • $buttonGroupstring
Результат:

php\swing\UIAbstractIButton[]

static getSelectedButtons($buttonGroup)
Параметры:
  • $buttonGroupstring
Результат:

php\swing\UIAbstractIButton[]

UIButton
php\swing\UIButton

extends: php\swing\UIAbstractIButton

Class UIButton

UICheckbox
php\swing\UICheckbox

extends: php\swing\UIAbstractIButton

Class UICheckbox

UICheckboxMenuItem
php\swing\UICheckboxMenuItem

extends: php\swing\UIMenuItem

Class UICheckboxMenuItem

UIColorChooser
php\swing\UIColorChooser

extends: php\swing\UIContainer

Class UIColorChooser

Properties


property color

php\swing\Color

property dragEnabled

bool

UICombobox
php\swing\UICombobox

extends: php\swing\UIContainer

Properties


property readOnly

bool

property popupVisible

bool

property lightweightPopup

bool

property itemCount

int

read-only

property selectedIndex

int

property maxRowCount

int

Methods


setItems($items)
Параметры:
  • $itemsarray
getItem($index)
Параметры:
  • $indexint
Результат:

string, null

addItem($item)
Параметры:
  • $itemstring
insertItem($index, $item)
Параметры:
  • $indexint
  • $itemstring
removeItem($index)
Параметры:
  • $indexint
removeAllItems()
onCellRender($callback = null)
Параметры:
  • $callbackcallable - (UICombobox $self, UILabel $template, $value, int $index, bool isSelected, bool cellHasFocus)
UIContainer
php\swing\UIContainer

abstract class

extends: php\swing\UIElement

Children


Methods


add($component, $index = null, $constraints = null)

Add child component

Параметры:
setLayout($type)
Параметры:
  • $typestring - - absolute, grid, flow, grid-bag, border, card
remove($component)
Параметры:
removeByIndex($index)

throws >

Параметры:
  • $indexint
removeAll()
getComponentCount()
Результат:int
getComponent($index)

throws >

Параметры:
  • $indexint
Результат:

php\swing\UIElement

getComponents()
Результат:php\swing\UIElement[]
getComponentByGroup($group)

Find first component by group

Параметры:
  • $groupstring
Результат:

php\swing\UIElement, NULL

getComponentsByGroup($group)

Find all components in group

Параметры:
  • $groupstring
Результат:

php\swing\UIElement[]

UIDesktopPanel
php\swing\UIDesktopPanel

extends: php\swing\UIContainer

Class UIDesktopPanel

UIDialog
php\swing\UIDialog

extends: php\swing\UIWindow

Class UIDialog

Constants


constant PLAIN_MESSAGE
constant ERROR_MESSAGE
constant INFORMATION_MESSAGE
constant WARNING_MESSAGE
constant QUESTION_MESSAGE
constant DEFAULT_OPTION
constant OK_CANCEL_OPTION
constant YES_NO_CANCEL_OPTION
constant YES_NO_OPTION
constant YES_OPTION
constant NO_OPTION
constant CANCEL_OPTION
constant OK_OPTION
constant CLOSED_OPTION

Properties


bool

property modalType

php\swing\string - modeless or document_modal or application_modal or toolkit_modal

Methods


__construct($owner = null)
Параметры:
showModal()
static message($text, $title, $type = ::)

Show basic message

Параметры:
  • $textstring
  • $titlestring
  • $typeint
static confirm($text, $title, $optionType = ::, $type = ::)
Параметры:
  • $textstring
  • $titlestring
  • $optionTypeint
  • $typeint
Результат:

int

static input($message, $initialValue = '')
Параметры:
  • $messagestring
  • $initialValuestring
Результат:

string

UIEdit
php\swing\UIEdit

extends: php\swing\UITextElement

Class UIEdit

Properties


property columns

int

property scrollOffset

int

UIEditorArea
php\swing\UIEditorArea

extends: php\swing\UITextElement

Class UIEditorArea

Properties


property contentType

string

Example: text/html or text/plain

UIElement
php\swing\UIElement

abstract class

Children


Properties


property uid

string

read-only

property group

string

property x

int

Position X

property y

int

Position Y

property w

int

Width

property h

int

Height

property size

array

Size (width and height), [int, int]

property preferredSize

php\swing\array [int, int]

property minSize

array

Min Size (width and height) [int, int]

property autosize

bool

property position

array

Position (x and y), [int, int]

property screenPosition

array

Screen Position (x and y), [int, int]

property absolutePosition

array

read-only

Absolute Position (x and y), [int, int]

property visible

bool

property enabled

bool

property focusable

bool

property align

php\swing\string - NONE, LEFT, RIGHT, TOP, BOTTOM, CLIENT

property anchors

array

[LEFT, TOP, RIGHT, BOTTOM]

property font

php\swing\Font

property border

php\swing\Border

property background

php\swing\Color

property foreground

php\swing\Color

property tooltipText

string

property doubleBuffered

bool

property opaque

bool

property ignoreRepaint

bool

property autoscrolls

bool

property uiClassId

string

read-only

property popupMenu

php\swing\UIPopupMenu

property cursor

string

property padding

php\swing\array [int, int, int, int]

property owner

php\swing\UIContainer

property parent

php\swing\UIContainer

property firstParent

php\swing\UIContainer

Methods


__construct()
getGraphics()

Get graphic canvas object

Результат:php\swing\Graphics
on($name, $callback, $group = 'general')

Events - Mouse: click mousePress mouseRelease mouseEnter mouseExit mouseMove mouseDrag

Keyboard: keyDown keyUp keyPress

Focus: focus blur

Add callback for event

Параметры:
  • $name
      • name of event
  • $callbackcallable
  • $groupstring
off($name, $group = NULL)

Remove all event callbacks (if group == null), or only group

Параметры:
  • $name
  • $groupnull, string
Результат:

bool

trigger($name)

Trigger callback by event name

Параметры:
  • $name
addAllowedEventType($name)

protected

Параметры:
  • $namestring
setAction($name, $callback = null)
Параметры:
  • $namestring
  • $callbackcallable
setInputKey($keyString, $actionName)
Параметры:
  • $keyStringstring
  • $actionNamestring
hasFocus()
Результат:bool
add($component, $index = null)

Add child component

Параметры:
getComponentAt($x, $y)

Determines if this component or one of its immediate subcomponents contains the (x, y) location, and if so, returns the containing component. This method only looks one level deep.

Параметры:
  • $x
  • $y
Результат:

php\swing\UIElement

printOne($canvas)

Prints this component.

Параметры:
printAll($canvas)

Prints this component and all of its subcomponents.

Параметры:
paintOne($canvas)

Paints this component.

Параметры:
paintAll($canvas)

Paints this component and all of its subcomponents.

Параметры:
updateUI()
invalidate()
repaint()
revalidate()
repaintRegion($x, $y, $w, $h)
Параметры:
  • $xint
  • $yint
  • $wint
  • $hint
grabFocus()
getTextWidth($str)

Return width of str for drawText + current font

Параметры:
  • $str
Результат:

int

getTextHeight()

Return height of one line text with current font

Результат:int
show()
hide()
toggle()
removeSelf()
static getByUid($uid)

Get component by unique id

Параметры:
  • $uidstring
Результат:

php\swing\UIElement

UIFileChooser
php\swing\UIFileChooser

extends: php\swing\UIContainer

Class UIFileChooser

Constants


constant FILES_ONLY
constant DIRECTORIES_ONLY
constant FILES_AND_DIRECTORIES

Properties


property dialogTitle

string

property approveButtonText

string

property selectedFile

php\io\File

property selectedFiles

php\swing\File[]

property multiSelection

bool

property selectionMode

int

Example: FILES_AND_DIRECTORIES, FILES_ONLY or DIRECTORIES_ONLY

property dragEnabled

bool

property fileHiding

bool

property controlButtonVisible

bool

property acceptAllFileFilterUsed

bool

Methods


showDialog($approveButtonText, $parent = null)
Параметры:
Результат:

bool

showSaveDialog($parent = null)
Параметры:
Результат:

bool

showOpenDialog($parent = null)
Параметры:
Результат:

bool

addChoosableFilter($filter, $description)
Параметры:
  • $filtercallable - (File $file) -> bool
  • $descriptionstring
addChoosableExtensions($extensions, $description, $showDirectories = true)
Параметры:
  • $extensionsarray - [‘jpg’, ‘gif’, ‘png’, ... etc]
  • $descriptionstring
  • $showDirectoriesbool
resetChoosableFilters()
isTraversable($file)
Параметры:
Результат:

bool

ensureFileIsVisible($file)
Параметры:
approveSelection()
cancelSelection()
changeToParentDirectory()
onFileView($field, $callback = null)
Параметры:
  • $fieldstring - - name (string), description (string), icon (Image), traversable (bool)
  • $callbackcallable - (File $file)
UIForm
php\swing\UIForm

extends: php\swing\UIWindow

Constants


constant NOTHING_ON_CLOSE
constant HIDE_ON_CLOSE
constant DISPOSE_ON_CLOSE
constant EXIT_ON_CLOSE

Properties


property maximized

bool

Methods


setDefaultCloseOperation($action)
Параметры:
  • $actionint
setIconImage($image = null)
Параметры:
UIImage
php\swing\UIImage

extends: php\swing\UIContainer

Class UIImage

Properties


property stretch

bool

property centered

bool

property proportional

bool

property smooth

bool

property mosaic

bool

Methods


setImage($image)
Параметры:
UIInternalForm
php\swing\UIInternalForm

extends: php\swing\UIContainer

Class UIInternalForm

Properties


property title

string

property selected

bool

property resizable

bool

Methods


setLayeredPanel($panel)
Параметры:
setContent($content)
Параметры:
UILabel
php\swing\UILabel

extends: php\swing\UIContainer

Properties


property text

string

Text of label

property verPosition

int

Direction

property horPosition

int

Direction

property verAlignment

int

Direction

property horAlignment

php\swing\int|string

Direction

property iconTextGap

int

Methods


setLabelFor($component)
Параметры:
setIcon($icon)
Параметры:
setDisabledIcon($icon)
Параметры:
UIListbox
php\swing\UIListbox

extends: php\swing\UIContainer

Class UIListbox

Properties


property multiple

bool

property selectedIndex

int

property selectedIndexes

int[]

property maxSelectionIndex

int

property minSelectionIndex

int

property visibleRowCount

int

property selectionBackground

php\swing\Color

property selectionForeground

php\swing\Color

property horScrollPolicy

php\swing\string - ALWAYS, HIDDEN, AUTO

property verScrollPolicy

php\swing\string - ALWAYS, HIDDEN, AUTO

property itemCount

int

read-only

Methods


setItems($items)
Параметры:
  • $itemsarray
getItem($index)
Параметры:
  • $indexint
Результат:

string, null

addItem($item)
Параметры:
  • $itemstring
insertItem($index, $item)
Параметры:
  • $indexint
  • $itemstring
removeItem($index)
Параметры:
  • $indexint
removeAllItems()
onCellRender($callback = null)
Параметры:
  • $callbackcallable - (UIListbox $self, UILabel $template, $value, int $index, bool isSelected, bool cellHasFocus)
UIManager
php\swing\UIManager

final class

Methods


__construct()

private

static setLookAndFeel($name)

Set look and feel globally

Параметры:
  • $name
      • name of theme
static getSystemLookAndFeel

Get name of OS native look and feel

Результат:string
UIMenu
php\swing\UIMenu

extends: php\swing\UIMenuItem

Class UIMenu events: select, deselect, cancel

Properties


property itemCount

int

read-only

property delay

int

property popupVisible

bool

Methods


getItem($pos)
Параметры:
  • $posint
Результат:

php\swing\UIMenuItem

addSeparator()
setMenuPosition($x, $y)
Параметры:
  • $xint
  • $yint
isTopLevelMenu()
Результат:bool
UIMenuBar
php\swing\UIMenuBar

extends: php\swing\UIContainer

Class UIMenuBar

Properties


property borderPainted

bool

UIMenuItem
php\swing\UIMenuItem

extends: php\swing\UIAbstractIButton

Children


Class UIMenuItem

Properties


property accelerator

string

Examples: “control DELETE”, “alt shift X”, “alt shift released X”, “typed a”

UIPanel
php\swing\UIPanel

extends: php\swing\UIContainer

Class UIPanel

UIPopupMenu
php\swing\UIPopupMenu

extends: php\swing\UIContainer

Class UIPopupMenu

Events: open, close, cancel

Properties


property borderPainted

bool

property lightweightPopup

bool

property label

string

Methods


addSeparator()
setPopupSize($width, $height)
Параметры:
  • $widthint
  • $heightint
setSelected($component)
Параметры:
show($invoker, $x, $y)
Параметры:
UIProgress
php\swing\UIProgress

extends: php\swing\UIContainer

Class UIProgress

Properties


property value

int

property max

int

property min

int

property text

string

property textPainted

bool

property borderPainted

bool

UIRadioButton
php\swing\UIRadioButton

extends: php\swing\UIToggleButton

Class UIRadioButton

UIReader
php\swing\UIReader

Class XmlUIReader

Properties


property useInternalForms

bool

Enables that the reader will create instances of UIInternalForm insteadof UIForm and UIDialog

Methods


read($stream)
Параметры:
Результат:

php\swing\UIElement

onRead($handle = NULL)
Параметры:
  • $handlecallable - (UIElement $el, $var)
onTranslate($handle = NULL)
Параметры:
  • $handlecallable - (UIElement $el, $value) -> mixed
UIRichTextArea
php\swing\UIRichTextArea

extends: php\swing\UITextElement

Class UIRichTextArea

Properties


property logicalStyle

php\swing\text\Style

property horScrollPolicy

php\swing\string - ALWAYS, HIDDEN, AUTO

property verScrollPolicy

php\swing\string - ALWAYS, HIDDEN, AUTO

Methods


addStyle($name, $parent = null)
Параметры:
Результат:

php\swing\text\Style

getStyle($name)
Параметры:
  • $namestring
Результат:

php\swing\text\Style

appendText($text, $style)
Параметры:
UIScrollPanel
php\swing\UIScrollPanel

extends: php\swing\UIContainer

Class UIScrollPanel

Properties


property horScrollPolicy

php\swing\string - ALWAYS, HIDDEN, AUTO

property verScrollPolicy

php\swing\string - ALWAYS, HIDDEN, AUTO

UISlider
php\swing\UISlider

extends: php\swing\UIContainer

Class UISlider

Properties


property value

int

property min

int

property max

int

property extent

int

property valueIsAdjusting

bool

property inverted

bool

property paintLabels

bool

property paintTicks

bool

property paintTrack

bool

property snapToTicks

bool

property labelTable

string[]

property majorTickSpacing

int

property minorTickSpacing

int

UITable
php\swing\UITable

extends: php\swing\UIContainer

Class UITable

Properties


property dragEnabled

bool

property selectionBackground

php\swing\Color

property selectionForeground

php\swing\Color

property gridColor

php\swing\Color

property editingColumn

int

property editingRow

int

property rowMargin

int

Methods


setRowHeight($height, $row = null)
Параметры:
  • $heightint
  • $rownull, int
getRowHeight($row = null)
Параметры:
  • $rownull, int
Результат:

int

setValueAt($value, $row, $column)
Параметры:
  • $valuestring, null
  • $rowint
  • $columnint
getValueAt($row, $column)
Параметры:
  • $rowint
  • $columnint
Результат:

string, null

columnAtPoint($x, $y)
Параметры:
  • $xint
  • $yint
Результат:

int

rowAtPoint($x, $y)
Параметры:
  • $xint
  • $yint
Результат:

int

editCellAt($row, $column)
Параметры:
  • $rowint
  • $columnint
Результат:

bool

addColumnSelectionInterval($index0, $index1)
Параметры:
  • $index0int
  • $index1int
addRowSelectionInterval($index0, $index1)
Параметры:
  • $index0int
  • $index1int
getColumnName($column)
Параметры:
  • $columnint
Результат:

string

setEditingColumn($column)
Параметры:
  • $columnint
setEditingRow($row)
Параметры:
  • $rowint
UITabs
php\swing\UITabs

extends: php\swing\UIContainer

Class UITabs

Events: change

Properties


property selectedIndex

int

property selectedComponent

php\swing\UIElement

property tabPlacement

php\swing\string - left, right, top, bottom

property tabCount

int

read-only

Methods


addTab($title, $component, $icon = null)
Параметры:
getTitleAt($index)
Параметры:
  • $indexint
Результат:

string

setTitleAt($index, $value)
Параметры:
  • $indexint
  • $valuestring
getToolTipTextAt($index)
Параметры:
  • $indexint
Результат:

string

setToolTipTextAt($index, $value)
Параметры:
  • $indexint
  • $valuestring
getTabIconAt($index)
Параметры:
  • $indexint
Результат:

php\swing\Image

setTabIconAt($index, $image)
Параметры:
getTabComponentAt($index)
Параметры:
  • $indexint
Результат:

php\swing\UIElement

setTabComponentAt($index, $component)
Параметры:
removeTabAt($index)
Параметры:
  • $indexint
removeAll()
indexAtPosition($x, $y)
Параметры:
  • $xint
  • $yint
Результат:

int

isEnabledAt($index)
Параметры:
  • $indexint
Результат:

bool

setEnabledAt($index, $enabled)
Параметры:
  • $indexint
  • $enabledbool
UITextArea
php\swing\UITextArea

extends: php\swing\UITextElement

Class UITextArea

Properties


property lineWrap

bool

property wrapStyleWord

bool

property rows

int

property columns

int

property tabSize

int

property lineCount

int

read-only

property horScrollPolicy

php\swing\string - ALWAYS, HIDDEN, AUTO

property verScrollPolicy

php\swing\string - ALWAYS, HIDDEN, AUTO

UITextElement
php\swing\UITextElement

abstract class

extends: php\swing\UIContainer

Children


Properties


property text

string

property readOnly

bool

property caretPos

int

property caretColor

php\swing\Color

property selectedStart

int

property selectedEnd

int

property selectedText

int

read-only

property selectionColor

php\swing\Color

property selectionTextColor

php\swing\Color

property disabledTextColor

php\swing\Color

property margin

php\swing\array [top, left, bottom, right]

int[]

Methods


copy()
cut()
paste()
select($selStart, $selEnd)
Параметры:
  • $selStartint
  • $selEndint
selectAll()
replaceSelection($content)
Параметры:
  • $contentstring
printDialog()

A convenience print method that displays a print dialog, and then prints this element in interactive mode with no header or footer text. Note: this method blocks until printing is done.

Результат:bool
UIToggleButton
php\swing\UIToggleButton

extends: php\swing\UIAbstractIButton

Children


Class UIToggleButton

UIToolBar
php\swing\UIToolBar

extends: php\swing\UIContainer

Class UIToolBar

Properties


property vertical

bool

property borderPainted

bool

property rollover

bool

property floatable

bool

Methods


addSeparator($w = null, $h = null)
Параметры:
  • $wnull, int
  • $hnull, int
UITree
php\swing\UITree

extends: php\swing\UIContainer

Class UITree

Properties


property model

php\swing\tree\TreeModel

property root

php\swing\tree\TreeNode

property rootVisible

bool

property editable

bool

property visibleRowCount

int

property dragEnabled

bool

property expandsSelectedPaths

bool

property invokesStopCellEditing

bool

property scrollsOnExpand

bool

property maxSelectionRow

int

read-only

property minSelectionRow

int

read-only

property leadSelectionRow

int

read-only

property selectionRows

int[]

property rowCount

int

read-only

property selectionCount

int

read-only

property rowHeight

int

property selectedNode

php\swing\tree\TreeNode

property selectedNodes

php\swing\TreeNode[]

property editingNode

php\swing\tree\TreeNode

read-only

property horScrollPolicy

php\swing\string - ALWAYS, HIDDEN, AUTO

property verScrollPolicy

php\swing\string - ALWAYS, HIDDEN, AUTO

Methods


onCellRender($renderer)
Параметры:
  • $renderercallable
addSelectionNode($node)
Параметры:
removeSelectionNode($node)
Параметры:
expandNode($node)
Параметры:
expandRow($row)
Параметры:
  • $rowint
collapseNode($node)
Параметры:
collapseRow($row)
Параметры:
  • $rowint
expandNodeAll($node)
Параметры:
collapseNodeAll($node)
Параметры:
isExpandedRow($row)
Параметры:
  • $rowint
Результат:

bool

isExpandedNode($node)
Параметры:
Результат:

bool

isNodeSelected($node)
Параметры:
Результат:

bool

isNodeEditable($node)
Параметры:
Результат:

bool

isVisible($node)
Параметры:
Результат:

bool

hasBeenExpanded($node)
Параметры:
Результат:

bool

fireTreeExpanded($node)
Параметры:
fireTreeCollapsed($node)
Параметры:
fireTreeWillExpand($node)

throws >

Параметры:
fireTreeWillCollapse($node)

throws >

Параметры:
makeVisible($node)
Параметры:
scrollToNode($node)
Параметры:
cancelEditing()
clearSelection()
UIUnknown
php\swing\UIUnknown

extends: php\swing\UIContainer

Class UIUnknown

UIWindow
php\swing\UIWindow

abstract class

extends: php\swing\UIContainer

Children


Properties


property title

string

property opacity

php\swing\float - 0 .. 1

property alwaysOnTop

bool

property resizable

bool

property undecorated

bool

Methods


isActive()
Результат:bool
isAlwaysOnTopSupported()
Результат:bool
moveToCenter()

time

Time
php\time\Time

Class Time, Immutable

Methods


__construct($date, $timezone = null)
Параметры:
  • $dateint - unix long timestamp (in millis)
  • $timezonephp\time\TimeZone - - if null then gets default timezone
getTime()

Returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this Time object.

Результат:int
getTimeZone()

Get timezone of the time object

Результат:php\time\TimeZone
year()

Get the current year

Результат:int
month()

Get the current month of the year, 1 - Jan, 12 - Dec

Результат:int
week()

Get week of year

Результат:int
weekOfMonth()

Get week of month

Результат:int
day()

Get day of year

Результат:int
dayOfMonth()

Get day of month

Результат:int
dayOfWeek()

Get day of week

Результат:int
dayOfWeekInMonth()
Результат:int
hour()

Get hour, indicating the hour of the morning or afternoon. hour() is used for the 12-hour clock (0 - 11). Noon and midnight are represented by 0, not by 12.

Результат:int
hourOfDay()

Get hour of the day

Результат:int
minute()

Get minute of the hour

Результат:int
second()

Get second of the minute

Результат:int
millisecond()

Get millisecond of the second

Результат:int
compare($time)

Compares the time values

Returns the value 0 if the time represented by the argument is equal to the time represented by this Time; a value less than 0 if the time of this Time is before the time represented by the argument; and a value greater than 0 if the time of this Time is after the time represented by the argument.

Параметры:
Результат:

int

withTimeZone($timeZone)
Параметры:
Результат:

php\time\Time

add($args)

Get a new time + $args

use negative values to minus

Параметры:
  • $argsarray - [millis, sec, min, hour, day, month, year]
Результат:

php\time\Time

replace($args)

Clones the current datetime and replaces some fields to new values $args

Параметры:
  • $argsarray - [millis, sec, min, hour, day, month, year]
Результат:

php\time\Time

toString($format)

Format the current datetime to string with $format

  • G Era designator Text AD
  • y Year Year 1996; 96
  • M Month in year Month July; Jul; 07
  • w Week in year Number 27
  • W Week in month Number 2
  • D Day in year Number 189
  • d Day in month Number 10
  • F Day of week in month Number 2
  • E Day in week Text Tuesday; Tue
  • a Am/pm marker Text PM
  • H Hour in day (0-23) Number 0
  • k Hour in day (1-24) Number 24
  • K Hour in am/pm (0-11) Number 0
  • h Hour in am/pm (1-12) Number 12
  • m Minute in hour Number 30
  • s Second in minute Number 55
  • S Millisecond Number 978
  • z Time zone General time zone Pacific Standard Time; PST; GMT-08:00
  • Z Time zone RFC 822 time zone -0800
Параметры:
  • $formatstring - date time format
Результат:

string

__toString()

Format the time to yyyy-MM-dd’T’HH:mm:ss

Результат:string
__clone()

private

static now($timeZone = null)

Returns now time object (date + time)

Параметры:
Результат:

php\time\Time

static today($timeZone = null)

Returns today date (without time)

Параметры:
Результат:

php\time\Time

static of($args, $timeZone = null)

Create a new time by using the $args arrays that can contain the sec, min, hour and other keys:

$time = Time::of(['year' => 2013, 'month' => 1, 'day' => 1]) // 01 Jan 2013
Параметры:
  • $argsarray - [millis, sec, min, hour, day, month, year]
  • $timeZonephp\time\TimeZone - if null then it uses the default timezone
Результат:

php\time\Time

static seconds

Returns the current time in seconds (like the millis() method only in seconds)

Результат:int
static millis

Returns the current time in milliseconds. Note that while the unit of time of the return value is a millisecond, the granularity of the value depends on the underlying operating system and may be larger. For example, many operating systems measure time in units of tens of milliseconds.

Результат:int
static nanos

Returns the current value of the running Java Virtual Machine’s high-resolution time source, in nanoseconds.

This method can only be used to measure elapsed time and is not related to any other notion of system or wall-clock time. The value returned represents nanoseconds since some fixed but arbitrary origin time (perhaps in the future, so values may be negative). The same origin is used by all invocations of this method in an instance of a Java virtual machine; other virtual machine instances are likely to use a different origin

Результат:int
TimeFormat
php\time\TimeFormat

Class TimeFormat, Immutable

Methods


__construct($format, $locale = null, $formatSymbols = null)
Параметры:
  • $formatstring
  • $localephp\util\Locale - if null then it uses the default locale
  • $formatSymbolsarray - [months => [...], short_months, eras, weekdays, short_weekdays, local_pattern_chars]
format($time)
Параметры:
Результат:

string

parse($string, $timeZone = null)
Параметры:
Результат:

php\time\Time, null if parse error then returns null

__clone()

private

TimeZone
php\time\TimeZone

Class TimeZone, Immutable

Methods


__construct($rawOffset, $ID, $options = null)
Параметры:
  • $rawOffsetint
  • $IDstring
  • $optionsarray
Результат:

php\time\TimeZone

getId()

Get id of the timezone

Результат:string
getRawOffset()

Get raw offset of the timezone

Результат:string
__clone()

private

static UTC

Returns UTC Time zone

Результат:php\time\TimeZone
static of($ID)
Параметры:
  • $IDstring - code of timezone, e.g.: ‘UTC’
Результат:

php\time\TimeZone

static setDefault($zone, $globally = false)

Set default time zone for Time objects, by default - the default timezone is UTC

Параметры:
static getDefault($globally = false)

Get default timezone

Параметры:
  • $globallybool - if false - only for the current environment
Результат:

php\time\TimeZone

static getAvailableIDs($rawOffset = null)

Returns all available ids of timezones

Параметры:
  • $rawOffsetint, null
Результат:

string[]

util

Configuration
php\util\Configuration

Class Configuration

Methods


__construct($source = null, $encoding = 'UTF-8')
Параметры:
has($key)
Параметры:
  • $keystring
Результат:

bool

get($key, $def = null)
Параметры:
  • $keystring
  • $defnull, string
Результат:

string

getArray($key, $def = [)
Параметры:
  • $keystring
  • $defarray
Результат:

string[]

getBoolean($key, $def = false)
Параметры:
  • $keystring
  • $defbool
Результат:

bool

getNumber($key, $def = 0)
Параметры:
  • $keystring
  • $defint, float
Результат:

int, float

getInteger($key, $def = 0)
Параметры:
  • $keystring
  • $defint
Результат:

int

set($key, $value)
Параметры:
  • $keystring
  • $valuestring, array
Результат:

string old value

put($values)
Параметры:
  • $valuesarray, Traversable
clear()
load($in, $encoding = 'UTF-8')
Параметры:
save($out, $encoding = 'UTF-8')
Параметры:
toArray()
Результат:array
Flow
php\util\Flow

implements: Iterator

A special class to work with arrays and iterators under flows. Flows are used for the lazy array/iterator operations, to save the RAM memory.

Class Flow, Immutable

Methods


__construct($collection)

Create a new flow, you can also use of() method

Параметры:
  • $collectionarray, Iterator
withKeys()

Enables to save keys for the next operation

Результат:php\util\Flow
onlyKeys($keys, $ignoreCase = false)
Параметры:
  • $keysarray, Traversable
  • $ignoreCasebool
Результат:

php\util\Flow

append($collection)

Appends a new collection to the current flow, do not remember that you can pass a flow to this method

Параметры:
  • $collectionarray, Iterator
Результат:

php\util\Flow

find($filter = null)

Finds elements by using the $filter callback, elements - for each iteration that returns true

Параметры:
  • $filtercallable
Результат:

php\util\Flow

findOne($filter = null)

Finds the first element by using the $filter callback, when $filter will return the first true

Параметры:
  • $filtercallable
Результат:

mixed

findValue($value, $strict = false)
Параметры:
  • $value
  • $strictbool
Результат:

int, null, string return null if not found, else - key of value

group($callback)
Параметры:
  • $callbackcallable
Результат:

php\util\Flow

each($callback)

Iterates elements. It will break if $callback returns false strongly

Параметры:
  • $callbackcallable - ($el[, $key]): bool
Результат:

int - iteration count

eachSlice($sliceSize, $callback, $withKeys = false)

Iterates elements as slices (that are passing as arrays to $callback). It will break if $callback returns false strongly

Параметры:
  • $sliceSizeint
  • $callbackcallable - (array $items): bool
  • $withKeysbool
Результат:

int - slice iteration count

map($callback)

Iterates elements and returns a new flow of the result Example:

$newFlow = Flow::of([1,2,3])->map(function($el){  return $el * 10 });

// the new flow will contain 10, 20 and 30

Параметры:
  • $callbackcallable - ($el[, $key])
Результат:

php\util\Flow

keys()

Create a new flow by using the keys of the current flow

Результат:php\util\Flow
skip($n)

Skips $n elements in the current collection

Параметры:
  • $nint - skip count
Результат:

php\util\Flow

limit($count)

Limits collection with $count

Параметры:
  • $countint - count of limit
Результат:

php\util\Flow

reduce($callback)

Iterates elements and gets a result of this operation It can be used for calculate some results, for example:

// calculates a sum of elements

$sum = .. ->reduce(function($result, $el){ $result = $result + $el });

Параметры:
  • $callbackcallable - ($result, $el[, $key])
Результат:

int

sort($comparator = null)

Sort the last result of the flow, also see: php\\lib\\items::sort()

Примечание

use the withKeys() method to save keys

Параметры:
  • $comparatorcallable - ($o1, $o2) -> int, where -1 smaller, 0 equal, 1 greater
Результат:

array

sortByKeys($comparator = null)

The same method as sort() only based on keys insteadof values

Примечание

use the withKeys() method to save keys

Параметры:
  • $comparatorcallable - ($key1, $key2) -> int
Результат:

array

toArray()

Convert elements to an array

Примечание

use the withKeys() method to save keys

Результат:array
toString($separator)

Join elements to a string similar to implode() in PHP

Параметры:
  • $separatorstring
Результат:

string

count()
Результат:int
current()
Результат:mixed
next()
Результат:void
key()
Результат:mixed
valid()
Результат:bool
rewind()
Результат:void
__clone()

private

static ofEmpty
Результат:php\util\Flow
static of($collection)

Creates a new flow for an array of Iterator

Параметры:
  • $collectionarray, Traversable
Результат:

php\util\Flow

static ofRange($from, $to, $step = 1)

Creates a new flow for a number range

Параметры:
  • $fromint
  • $toint
  • $stepint
Результат:

php\util\Flow

static ofString($string, $chunkSize = 1)

Creates a new flow for the string

Параметры:
  • $stringstring
  • $chunkSizeint - how many characters to combine for one item ?
Результат:

php\util\Flow

static ofStream($stream, $chunkSize = 1)

Creates a new flow for the Stream object

Параметры:
  • $streamphp\io\Stream - stream object
  • $chunkSizeint - size for Stream.read($size) method
Результат:

php\util\Flow

LauncherClassLoader
php\util\LauncherClassLoader

extends: php\lang\ClassLoader

Class LauncherClassLoader

Methods


loadClass($name)
Параметры:
  • $namestring
Locale
php\util\Locale

Class Locale, Immutable

Methods


__construct($lang, $country = '', $variant = '')
Параметры:
  • $langstring
  • $countrystring
  • $variantstring
getLanguage()
Результат:string
getDisplayLanguage($locale = null)
Параметры:
Результат:

string

getCountry()
Результат:string
getDisplayCountry($locale = null)
Параметры:
Результат:

string

getVariant()
Результат:string
getDisplayVariant($locale = null)
Параметры:
Результат:

string

getISO3Country()
Результат:string
getISO3Language()
Результат:string
__toString()

Returns a string representation of this Locale object, consisting of language, country, variant, script, and extensions as below:

language + “_” + country + “_” + (variant + “_#” | “#”) + script + “-” + extensions

Результат:string
__clone()

private

static ENGLISH
Результат:php\util\Locale
static US
Результат:php\util\Locale
static UK
Результат:php\util\Locale
static CANADA
Результат:php\util\Locale
static CANADA_FRENCH
Результат:php\util\Locale
static FRENCH
Результат:php\util\Locale
static FRANCE
Результат:php\util\Locale
static ITALIAN
Результат:php\util\Locale
static ITALY
Результат:php\util\Locale
static GERMAN
Результат:php\util\Locale
static GERMANY
Результат:php\util\Locale
static JAPAN
Результат:php\util\Locale
static JAPANESE
Результат:php\util\Locale
static KOREA
Результат:php\util\Locale
static KOREAN
Результат:php\util\Locale
static CHINA
Результат:php\util\Locale
static CHINESE
Результат:php\util\Locale
static TAIWAN
Результат:php\util\Locale
static RUSSIAN
Результат:php\util\Locale
static RUSSIA
Результат:php\util\Locale
static ROOT
Результат:php\util\Locale
static getDefault($globally = false)

Get default locale (if globally = false - only for the current environment)

Параметры:
  • $globallybool
Результат:

php\util\Locale

static setDefault($locale, $globally = false)

Set default locale

Параметры:
  • $localephp\util\Locale
  • $globallybool - if false - only for the current environment
static getAvailableLocales

Returns an array of all installed locales. The returned array represents the union of locales supported by the Java runtime environment

Результат:php\util\Locale[] An array of installed locales.
Promise
php\util\Promise

Methods


__construct()

private

static create($initialValue, $callback)
Параметры:
  • $initialValuemixed - (optional)
  • $callbackcallable - ($value) - assign callback
Результат:

mixed

Regex
php\util\Regex

implements: Iterator

http://www.regular-expressions.info/java.html

Class Regex, Immutable

Constants


constant CANON_EQ
constant CASE_INSENSITIVE
constant UNICODE_CASE
constant COMMENTS
constant DOTALL
constant LITERAL
constant MULTILINE
constant UNIX_LINES

Methods


__construct()

private

getPattern()

Get the current pattern

Результат:string
getFlags()

Get the current flags

Результат:int
static of($pattern, $flag = 0)

Creates a new Regex of regex with $string and $flag

throws php\util\RegexException

Параметры:
  • $patternstring - regular expression
  • $flagint - Regex::CASE_INSENSITIVE and other constants
Результат:

php\util\Regex

matches()

Attempts to match the entire region against the pattern.

Результат:bool
find($start = null)

Resets this matcher and then attempts to find the next subsequence of the input sequence that matches the pattern, starting at the specified index.

throws php\util\RegexException

Параметры:
  • $startint, null
Результат:

bool

replace($replacement)

Replaces every subsequence of the input sequence that matches the pattern with the given replacement string.

This method first resets this matcher. It then scans the input sequence looking for matches of the pattern. Characters that are not part of any match are appended directly to the result string; each match is replaced in the result by the replacement string.

throws php\util\RegexException

Параметры:
  • $replacementstring
Результат:

string

replaceFirst($replacement)

Replaces the first subsequence of the input sequence that matches the pattern with the given replacement string.

throws php\util\RegexException

Параметры:
  • $replacementstring
Результат:

string

replaceGroup($group, $replacement)

throws php\util\RegexException

Параметры:
  • $groupint
  • $replacementstring
Результат:

string

replaceWithCallback($callback)

throws php\util\RegexException

Параметры:
  • $callbackcallable - (Regex $pattern) -> string
Результат:

string

with($string)

Duplicates this pattern with a new $string

Параметры:
  • $stringstring
Результат:

php\util\Regex

withFlags($flags)

Clone this object with the new $flags

Параметры:
  • $flagsint
Результат:

php\util\Regex

group($group = null)

Returns the input subsequence captured by the given group during the previous match operation.

throws php\util\RegexException

Параметры:
  • $groupnull, int
Результат:

string

getGroupCount()

Returns the number of capturing groups in this matcher’s pattern.

Результат:int
start($group = null)

Returns the start index of the previous match.

throws php\util\RegexException

Параметры:
  • $groupnull, int
Результат:

int

end($group = null)

Returns the offset after the last character matched.

throws php\util\RegexException

Параметры:
  • $groupnull, int
Результат:

int

hitEnd()

Returns true if the end of input was hit by the search engine in the last match operation performed by this matcher.

Результат:bool
requireEnd()

Returns true if more input could change a positive match into a negative one.

If this method returns true, and a match was found, then more input could cause the match to be lost. If this method returns false and a match was found, then more input might change the match but the match won’t be lost. If a match was not found, then requireEnd has no meaning.

Результат:bool
lookingAt()

Attempts to match the input sequence, starting at the beginning of the region, against the pattern.

Результат:bool
region($start, $end)

Sets the limits of this matcher’s region. The region is the part of the input sequence that will be searched to find a match. Invoking this method resets the matcher, and then sets the region to start at the index specified by the $start parameter and end at the index specified by the $end parameter.

throws php\util\RegexException

Параметры:
  • $startint
  • $endint
Результат:

php\util\Regex

regionStart()

Reports the start index of this matcher’s region. The searches this matcher conducts are limited to finding matches within regionStart() (inclusive) and regionEnd() (exclusive).

Результат:int
regionEnd()

Reports the end index (exclusive) of this matcher’s region. The searches this matcher conducts are limited to finding matches within regionStart() (inclusive) and regionEnd() (exclusive).

Результат:int
reset($string = null)

Resets this matcher.

Resetting a matcher discards all of its explicit state information and sets its append position to zero. The matcher’s region is set to the default region, which is its entire character sequence. The anchoring and transparency of this matcher’s region boundaries are unaffected.

Параметры:
  • $stringnull, string - The new input character sequence
Результат:

php\util\$this

current()
Результат:null, string
next()
key()
Результат:int
valid()
Результат:bool
rewind()
__clone()

private

static match($pattern, $string, $flags = 0)

Tells whether or not this string matches the given regular expression. See also java.lang.String.matches()

Параметры:
  • $patternstring - regular expression
  • $stringstring
  • $flagsint
Результат:

bool

static split($pattern, $string, $limit = 0)

Splits this string around matches of the given regular expression. See also java.lang.String.split()

throws php\util\RegexException

Параметры:
  • $patternstring - the delimiting regular expression
  • $stringstring
  • $limitint - the result threshold
Результат:

array the array of strings computed by splitting this string around matches of the given regular expression

static quote($string)

Returns a literal pattern String for the specified String.

This method produces a String that can be used to create a Regex that would match the string $string as if it were a literal pattern. Metacharacters or escape sequences in the input sequence will be given no special meaning.

Параметры:
  • $stringstring - The string to be literalized
Результат:

string A literal string replacement

static quoteReplacement($string)

Returns a literal replacement String for the specified String.

This method produces a String that will work as a literal replacement $string in the replaceWithCallback() method of the php\util\Regex class. The String produced will match the sequence of characters in $string treated as a literal sequence. Slashes (‘’) and dollar signs (‘$’) will be given no special meaning.

Параметры:
  • $stringstring
Результат:

string

RegexException
php\util\RegexException

extends: php\lang\JavaException

Class RegexException

Scanner
php\util\Scanner

implements: Iterator

A simple text scanner which can parse primitive types and strings using regular expressions.

Class Scanner

Methods


__construct($source, $charset = null)

throws php\lang\IllegalArgumentException if $charset is invalid

Параметры:
  • $sourcestring, php\io\Stream
  • $charsetstring, null - e.g.: UTF-8, windows-1251, etc., only for Stream objects
hasNext($pattern = null)
Параметры:
Результат:

bool

next($pattern = null)
Параметры:
Результат:

string, null null if doesn’t has the next pattern

nextLine()
Результат:string, null null if doesn’t has the next line
hasNextLine()
Результат:bool
nextInt($radix = null)
Параметры:
  • $radixnull, int - if null then uses the default radix
Результат:

int, null null if doesn’t has the next int

hasNextInt($radix = null)
Параметры:
  • $radixnull, int - if null then uses the default radix
Результат:

bool

nextDouble()
Результат:float, null null if does not has the next double
hasNextDouble()
Результат:bool
skip($pattern)
Параметры:
Результат:

bool true on success, false on fail

useDelimiter($delimiter)
Параметры:
Результат:

php\util\Scanner

useLocale($locale)
Параметры:
Результат:

php\util\Scanner

useRadix($value)
Параметры:
  • $valueint
Результат:

php\util\Scanner

getIOException()

Get the last io exception (if does not occur then returns null)

Результат:php\io\IOException, null
reset()
current()

Uses the result of the last called next() method

Результат:string
key()
Результат:int
valid()
Результат:bool
rewind()
__clone()

private

Shared
php\util\Shared

Class to work with shared memory of Environments

Class Shared

Methods


__construct()

private

static value($name, $creator = null)

Get or create if does not exist and get a shared value

Параметры:
  • $namestring
  • $creatorcallable - returns init value
Результат:

php\util\SharedValue

static reset($name)

Removes the value by $name.

Параметры:
  • $namephp\util\String
Результат:

php\util\SharedValue removed value

static resetAll
SharedCollection
php\util\SharedCollection

abstract class

extends: php\util\SharedMemory

implements: Countable, Traversable

Children


Methods


isEmpty()

abstract

Результат:bool
count()

abstract

Результат:int
clear()

abstract

Remove all elements.

Результат:void
SharedMap
php\util\SharedMap

extends: php\util\SharedCollection

Class SharedMap

Methods


__construct($array)
Параметры:
  • $arrayarray, Traversable - (optional)
get($key, $default = null)
Параметры:
  • $keystring
  • $defaultmixed
Результат:

mixed

getOrCreate($key, $createCallback)
Параметры:
  • $keystring
  • $createCallbackcallable
Результат:

mixed

has($key)
Параметры:
  • $keystring
Результат:

bool

count()
Результат:int
set($key, $value, $override = true)
Параметры:
  • $keystring
  • $valuemixed
  • $overridebool
Результат:

mixed previous value

remove($key)
Параметры:
  • $keystring
Результат:

mixed

clear()
isEmpty()
Результат:bool
SharedMemory
php\util\SharedMemory

abstract class

Children


Methods


synchronize($callback)

You can use a shared value as a mutex

Параметры:
  • $callbackcallable - (SharedValue $this)
Результат:

mixed result of execution of $callback

SharedQueue
php\util\SharedQueue

extends: php\util\SharedCollection

Class SharedQueue

Methods


__construct($array)
Параметры:
  • $arrayarray, Traversable - (optional)
isEmpty()
Результат:bool
count()
Результат:int
clear()

Remove all elements.

Результат:void
add($value)
Параметры:
  • $valuemixed
Результат:

bool

peek()
Результат:mixed
poll()

Retrieves and removes the head of this queue.

Результат:mixed
SharedStack
php\util\SharedStack

extends: php\util\SharedCollection

Class SharedStack

Methods


__construct($array)
Параметры:
  • $arrayarray, Traversable - (optional)
push($value)
Параметры:
  • $valuemixed
Результат:

mixed peek value

pop()
Результат:mixed peek value
peek()
Результат:mixed
count()
Результат:int
clear()
isEmpty()
Результат:bool
SharedValue
php\util\SharedValue

extends: php\util\SharedMemory

Class SharedValue

Methods


__construct($value)
Параметры:
  • $valuemixed - (optional)
get()
Результат:mixed
set($value, $override = true)
Параметры:
  • $valuemixed
  • $overridebool
Результат:

mixed

remove()
Результат:mixed
isEmpty()
Результат:bool
getAndSet($updateCallback)
Параметры:
  • $updateCallbackcallable - ($oldValue) returns a new value
Результат:

mixed

setAndGet($updateCallback)
Параметры:
  • $updateCallbackcallable - ($oldValue) returns a new value
Результат:

mixed

webserver

WebRequest
php\webserver\WebRequest

Class WebRequest

Properties


property method

string

read-only

property scheme

string

read-only

property pathInfo

string

read-only

property servletPath

string

read-only

property queryString

string

read-only

property authType

string

read-only

property url

string

read-only

property port

int

read-only

property ip

string

read-only

property cookies

array

read-only

Array of arrays [name, value, path, domain, httpOnly, secure, maxAge, comment]

Methods


__construct($parent)

protected

Параметры:
getBody()
Результат:string
getBodyStream()
Результат:php\io\Stream
getMethod()

protected

Результат:string
getPathInfo()

protected

Результат:string
getAuthType()

protected

Результат:string
getQueryString()

protected

Результат:string
getUrl()

protected

Результат:string
getScheme()

protected

Результат:string
getPort()

protected

Результат:int
getIp()

protected

Результат:string
static current
Результат:php\webserver\WebRequest
WebResponse
php\webserver\WebResponse

Class WebResponse

Properties


property status

int

property contentType

string

property characterEncoding

string

property bufferSize

int

Methods


__construct($parent)

protected

Параметры:
setHeader($name, $value)
Параметры:
  • $namestring
  • $valuestring
getHeader($name)
Параметры:
  • $namestring
Результат:

string

getHeaders($name)
Параметры:
  • $namestring
Результат:

string[]

getHeaderNames()
Результат:string[]
addHeader($name, $value)
Параметры:
  • $namestring
  • $valuestring
redirect($location, $httpStatus = 301)
Параметры:
  • $locationstring
  • $httpStatusint
encodeRedirectURL($url)
Параметры:
  • $urlstring
writeToBody($content)
Параметры:
  • $contentstring
setContentLength($length)
Параметры:
  • $lengthint
addCookie($cookie)
Параметры:
  • $cookiearray - [name, value, maxAge, path, domain, httpOnly, secure, comment]
getStatus()

protected

Результат:int
setStatus($status)

protected

Параметры:
  • $statusint
getContentType()

protected

Результат:string
setContentType($contentType)

protected

Параметры:
  • $contentTypestring
getCharacterEncoding()

protected

Результат:string
setCharacterEncoding($characterEncoding)

protected

Параметры:
  • $characterEncodingstring
getBufferSize()

protected

Результат:int
setBufferSize($bufferSize)

protected

Параметры:
  • $bufferSizeint
static current
Результат:php\webserver\WebResponse
WebServer
php\webserver\WebServer

Embedded http web server.

Class WebServer

Properties


property id

string

read-only

property port

int

property isolated

bool

property importAutoloaders

bool

property hotReload

bool

Methods


__construct($onRequest)
Параметры:
  • $onRequestcallable
run()
addStaticHandler($handler)
Параметры:
  • $handlerarray - [path, location, cache, cachePeriod, gzip]
Результат:

php\webserver\WebServer

getId()

protected

Результат:string
getPort()

protected

Результат:int
setPort($port)

protected

Параметры:
  • $portint
isIsolated()

protected

Результат:boolean
setIsolated($isolated)

protected

Параметры:
  • $isolatedboolean
isImportAutoloaders()

protected

Результат:boolean
setImportAutoloaders($importAutoloaders)

protected

Параметры:
  • $importAutoloadersboolean
isHotReload()

protected

Результат:boolean
setHotReload($hotReload)

protected

Параметры:
  • $hotReloadboolean
__clone()

private

static current
Результат:php\webserver\WebServer

xml

DomDocument
php\xml\DomDocument

abstract class

extends: php\xml\DomElement

Methods


getDocumentElement()
Результат:php\xml\DomDocument
getElementById($id)
Параметры:
  • $idstring
Результат:

php\xml\DomElement

getInputEncoding()
Результат:string
getXmlEncoding()
Результат:string
getXmlVersion()
Результат:string
getXmlStandalone()
Результат:bool
setXmlStandalone($value)
Параметры:
  • $valuebool
getStrictErrorChecking()
Результат:bool
setStrictErrorChecking($value)
Параметры:
  • $valuebool
getDocumentURI()
Результат:string
setDocumentURI($value)
Параметры:
  • $valuestring
createElement($tagName, $model)
Параметры:
  • $tagNamestring
  • $modelTraversable, array - (optional)
Результат:

php\xml\DomElement

createElementNS($namespaceURI, $qualifiedName)
Параметры:
  • $namespaceURIstring
  • $qualifiedNamestring
Результат:

php\xml\DomElement

createProcessingInstruction($name, $value)
Параметры:
  • $namestring
  • $valuestring
Результат:

php\xml\DomNode

importNode($importedNode, $deep)
Параметры:
Результат:

php\xml\DomNode

adoptNode($source)
Параметры:
Результат:

php\xml\DomNode

renameNode($node, $namespaceURI, $qualifiedName)
Параметры:
  • $nodephp\xml\DomNode
  • $namespaceURIstring
  • $qualifiedNamestring
normalizeDocument()
DomElement
php\xml\DomElement

abstract class

extends: php\xml\DomNode

Children


Methods


__get($name)
Параметры:
  • $namestring
Результат:

string Value of attribute by $name

__set($name, $value)

Set attribute value

Параметры:
  • $namestring
  • $valuestring
__unset($name)

Remove attribute by name

Параметры:
  • $namestring
__isset($name)

Check attribute exists by name

Параметры:
  • $name
Результат:

bool

getTagName()
Результат:string
getAttribute($name)
Параметры:
  • $namestring
Результат:

string

hasAttribute($name)
Параметры:
  • $namestring
Результат:

bool

hasAttributeNS($namespaceURI, $localName)
Параметры:
  • $namespaceURIstring
  • $localNamestring
Результат:

bool

setAttribute($name, $value)
Параметры:
  • $namestring
  • $valuestring
setAttributes($attributes)
Параметры:
  • $attributesarray, Traversable
getAttributes()
Результат:array
removeAttribute($name)
Параметры:
  • $namestring
getElementsByTagName($name)
Параметры:
  • $namestring
Результат:

php\xml\DomNodeList

getElementsByTagNameNS($namespaceURI, $localName)
Параметры:
  • $namespaceURIstring
  • $localNamestring
Результат:

php\xml\DomNodeList

getAttributeNS($namespaceURI, $localName)
Параметры:
  • $namespaceURIstring
  • $localNamestring
Результат:

string

setAttributeNS($namespaceURI, $qualifiedName, $value)
Параметры:
  • $namespaceURIstring
  • $qualifiedNamestring
  • $valuestring
removeAttributeNS($namespaceURI, $localName)
Параметры:
  • $namespaceURIstring
  • $localNamestring
setIdAttribute($name, $isId)
Параметры:
  • $namestring
  • $isIdbool
setIdAttributeNS($namespaceURI, $localName, $isId)
Параметры:
  • $namespaceURIstring
  • $localNamestring
  • $isIdstring
DomNode
php\xml\DomNode

abstract class

Children


Methods


get($xpathExpression)
Параметры:
  • $xpathExpressionstring
Результат:

string

find($xpathExpression)
Параметры:
  • $xpathExpressionstring
Результат:

php\xml\DomNode

findAll($xpathExpression)
Параметры:
  • $xpathExpressionstring
Результат:

php\xml\DomNodeList

getBaseURI()
Результат:string
getNamespaceURI()
Результат:string
getLocalName()
Результат:string
getNodeType()
Результат:int
getNodeName()
Результат:string
getNodeValue()
Результат:string
getPrefix()
Результат:string
getTextContent()
Результат:string
getFirstChild()
Результат:php\xml\DomNode
getLastChild()
Результат:php\xml\DomNode
getNextSibling()
Результат:php\xml\DomNode
getPreviousSibling()
Результат:php\xml\DomNode
getParentNode()
Результат:php\xml\DomNode
getOwnerDocument()
Результат:php\xml\DomDocument
hasAttributes()
Результат:bool
hasChildNodes()
Результат:bool
isDefaultNamespace($namespace)
Параметры:
  • $namespacestring
isEqualNode($node)
Параметры:
Результат:

bool

isSameNode($node)
Параметры:
Результат:

bool

isSupported($feature, $version)
Параметры:
  • $featurestring
  • $versionstring
Результат:

bool

lookupNamespaceURI($prefix)
Параметры:
  • $prefixstring
Результат:

string

lookupPrefix($namespaceURI)
Параметры:
  • $namespaceURIstring
Результат:

string

normalize()
setTextContent($content)
Параметры:
  • $contentstring
setPrefix($prefix)
Параметры:
  • $prefixstring
cloneNode($deep)
Параметры:
  • $deepbool
Результат:

php\xml\DomNode

appendChild($node)
Параметры:
Результат:

php\xml\$this

removeChild($node)
Параметры:
Результат:

php\xml\$this

replaceChild($newNode, $oldNode)
Параметры:
Результат:

php\xml\$this

insertBefore($newNode, $refNode)
Параметры:
Результат:

php\xml\$this

toModel()
Результат:array
DomNodeList
php\xml\DomNodeList

abstract class

implements: ArrayAccess, Iterator, Countable

XmlProcessor
php\xml\XmlProcessor

extends: php\format\Processor

Class XmlProcessor

Methods


format($value)

throws php\format\ProcessorException

Параметры:
Результат:

string xml

formatTo($value, $output)

throws php\format\ProcessorException

Параметры:
parse($string)

throws php\format\ProcessorException

Параметры:
Результат:

php\xml\DomDocument

createDocument()
Результат:php\xml\DomDocument

JPHP is a new implementation for PHP which uses the Java VM. It supports many features of the PHP language (5.4+). How does it work? JPHP is a compiler like javac, it compiles php sources to JVM bytecode and then can execute the result on the Java VM.

Примечание

Supports: JDK 1.6+ (OpenJDK, Oracle), Linux, Windows, MacOS, etc.