Haxe/php API documentation

To get started with the Haxe php target:


package php

..
net
reflection
ArrayAccess

Native PHP interface.

ArrayIterator

See also:

Attribute

See also:

BadFunctionCallException

Exception thrown if a callback refers to an undefined function or if some arguments are missing.

BadMethodCallException

Exception thrown if a callback refers to an undefined method or if some arguments are missing.

CacheLimiter

Closure

See also:

Collator

See also:

Const

This class contains externs for native PHP constants defined in global namespace. For native PHP functions in global namespace see php.Global.

Countable

See also:

DateInterval

See also:

DatePeriod

See also:

DateTime

See also:

DateTimeImmutable

See also:

DateTimeInterface

See also:

DateTimeZone

See also:

DirectoryIterator

The DirectoryIterator class provides a simple interface for viewing the contents of filesystem directories.

DomainException

Exception thrown if a value does not adhere to a defined valid data domain.

Error

ErrorException

See also:

Exception

FilesystemIterator

The Filesystem iterator.

Finfo

See also:

Generator

Generator is not a Haxe Iterable. It can be iterated one time only. Unfortunately Haxe does not know that in PHP generators may have no return expression or return value with any type of value. Use return null or untyped cast to workaround this issue:

Global

This class contains externs for native PHP functions defined in global namespace. For native PHP constants in global namespace see php.Const.

IntlCalendar

See also:

IntlDateFormatter

See also:

IntlIterator

See also:

IntlTimeZone

See also:

InvalidArgumentException

Exception thrown if an argument is not of the expected type.

IteratorAggregate

See also:

JsonSerializable

See also:

LengthException

Exception thrown if a length is invalid.

Lib

Platform-specific PHP Library. Provides some platform-specific functions for the PHP target, such as conversion from Haxe types to native types and vice-versa.

Locale

See also:

LogicException

Exception that represents error in the program logic. This kind of exception should lead directly to a fix in your code.

NativeArray

Native PHP array.

NativeAssocArray

NativeIndexedArray

NativeIterator

Native PHP interface.

NativeString

Native PHP string.

NativeStringIterator

NativeStringKeyValueIterator

NativeStructArray

This type can be used in places where externs use associative arrays as a list of configuration options. This type is a special case for Haxe->Php generator: object declaration is generated as php array declaration whenever that object declaration is passed directly to a variable or a function argument of this type.

NumberFormatter

See also:

OutOfBoundsException

Exception thrown if a value is not a valid key. This represents errors that cannot be detected at compile time.

OutOfRangeException

Exception thrown when an illegal index was requested. This represents errors that should be detected at compile time.

OverflowException

Exception thrown when adding an element to a full container.

Phar

The Phar class provides a high-level interface to accessing and creating PHAR archives.

PharData

The PharData class provides a high-level interface to accessing and creating non-executable TAR and ZIP archives.

PharException

The PharException class provides a phar-specific exception class for try/catch blocks.

PharFileInfo

The PharFileInfo class provides a high-level interface to the contents and attributes of a single file within a PHAR archive.

RangeException

Exception thrown to indicate range errors during program execution. Normally this means there was an arithmetic error other than under/overflow.

RecursiveDirectoryIterator

The RecursiveDirectoryIterator provides an interface for iterating recursively over filesystem directories.

RecursiveIterator

Classes implementing RecursiveIterator can be used to iterate over iterators recursively.

Ref

Special type which allows passing function arguments by reference. This type should be used for externs only.

Resource

PHP native resource type

ResourceBundle

The ResourceBundle class implements access to ICU resource data files.

RuntimeException

Exception thrown if an error which can only be found on runtime occurs.

Scalar

Scalar is a type that is compatible with any scalar value (int, float, bool, string)

SeekableIterator

See also:

Serializable

See also:

Session

Session consists of a way to preserve certain data across subsequent accesses.

SessionHandlerInterface

See also:

SplFileInfo

The SplFileInfo class offers a high-level object-oriented interface to information for an individual file.

SplFileInfoType

SplFileObject

The SplFileObject class offers an object-oriented interface for a file.

StdClass

SuperGlobal

Syntax

Special extern class to support PHP language specifics. Don't use these functions unless you are really sure what you are doing.

Throwable

See also:

Transliterator

See also:

Traversable

See also:

UnderflowException

Exception thrown when performing an invalid operation on an empty container, such as removing an element.

UnexpectedValueException

Exception thrown if a value does not match with a set of values. Typically this happens when a function calls another function and expects the return value to be of a certain type or value not including arithmetic or buffer related errors.