Overview

Namespaces

  • Alchemy
    • core
      • query
      • schema
    • dialect
    • engine
    • orm
    • tests
    • util
      • promise
  • PHP

Classes

  • Element

Interfaces

  • IElement
  • Overview
  • Namespace
  • Class
  • Tree

Class Element

Base class for composable elements

Alchemy\core\Element implements Alchemy\core\IElement

Direct known subclasses

Alchemy\core\query\ColumnRef, Alchemy\core\query\DDLQuery, Alchemy\tests\MockElement, Alchemy\core\query\Expression, Alchemy\core\query\Join, Alchemy\core\query\Query, Alchemy\core\query\Scalar, Alchemy\core\query\TableRef, Alchemy\core\schema\Table, Alchemy\core\schema\TableElement, Alchemy\orm\Relationship

Indirect known subclasses

Alchemy\core\query\Insert, Alchemy\core\query\Predicate, Alchemy\orm\ORMTable, Alchemy\orm\ORMTableRef, Alchemy\core\schema\Column, Alchemy\core\schema\Foreign, Alchemy\core\schema\ForeignKey, Alchemy\core\schema\Index, Alchemy\orm\ManyToOne, Alchemy\orm\OneToMany, Alchemy\orm\OneToOne, Alchemy\orm\ORMQuery
Namespace: Alchemy\core
Located at alchemy/core/Element.php
Methods summary
public static
# __callStatic( mixed $name, mixed $args )

Return a new instance of an Element type. If the type is an alias, may return an instance of a different subclass.

Return a new instance of an Element type. If the type is an alias, may return an instance of a different subclass.

public static
# define( string $type = null, string $base = null, array $def = array() )

Define a new type for this Element class. Create an object of this type by calling Element::Type()

Define a new type for this Element class. Create an object of this type by calling Element::Type()

Parameters

$type
string
$type new type identifier (defaults to class name)
$base
string
$base type to inherit from (defaults to class name)
$def
array
$def [description]
public static
# define_alias( string $type, string $base )

Define a new type as an alias to another type, possibly of a different class.

Define a new type as an alias to another type, possibly of a different class.

Parameters

$type
string
$type new type identifier
$base
string
$base type to alias
public static array
# get_definition( string $type )

Get the definition array for "Type" or "Class::Type"

Get the definition array for "Type" or "Class::Type"

Parameters

$type
string
$type type identifier

Returns

array
type definition
protected static mixed
# normalize_arg( mixed $arg, mixed $default )

Convert an argument's structure to be similar to the default ie. (5, array(array())) -> array(array(5))

Convert an argument's structure to be similar to the default ie. (5, array(array())) -> array(array(5))

Returns

mixed
public
# __clone( )
public
# __construct( mixed $type = null )
public
# addTag( string $tag, string $value = true )

Apply a tag to this element. The same tag cannot be applied with two different values.

Apply a tag to this element. The same tag cannot be applied with two different values.

Parameters

$tag
string
$tag
$value
string
$value optional value to give tag

Implementation of

Alchemy\core\IElement::addTag()
public
# addTags( mixed $tags )
public
# copy( )
public
# getDescription( mixed $maxdepth = 3, mixed $curdepth = 0 )
public string
# getID( )

Get the locally-unique element id

Get the locally-unique element id

Returns

string

Implementation of

Alchemy\core\IElement::getID()
public mixed
# getTag( string $tag )

If the tag has been applied to this object, returns its value, else false

If the tag has been applied to this object, returns its value, else false

Parameters

$tag
string
$tag tag name

Returns

mixed
value or false

Implementation of

Alchemy\core\IElement::getTag()
public
# getType( )
public array
# listTags( )

List of all tags that apply to this element

List of all tags that apply to this element

Returns

array

Implementation of

Alchemy\core\IElement::listTags()
Properties summary
protected mixed $id
#
protected mixed $type
#
protected array $tags array()
#
API documentation generated by ApiGen 2.8.0