OpenBD Wiki

From OpenBD
Jump to: navigation, search

Compatibility:CFCs

Contents

VAR keyword

  • The VAR keyword may be used anywhere within a CFFUNCTION tag. It is not restricted to placement only immediately following the CFARGUMENT tags as it is in Adobe ColdFusion.

TYPE Attribute

  • A new TYPE attribute has been added to the CFCOMPONENT tag. See discussions of Abstract CFCs and Interfaces below for more details.

Abstract CFCs

  • A CFC may be of type ABSTRACT (<cfcomponent type="abstract">). This indicates that the CFC may not be instantiated via CFOBJECT or CreateObject(), but may only be used as a base class by other CFCs.
  • Both abstract and concrete functions may be included in an abstract CFC.
    • The CFC type must be abstract if the CFC contains abstract functions.
  • A CFC that extends an abstract CFC must implement all abstract functions defined in the abstract CFC, or the CFC that extends the abstract CFC must itself be abstract.
  • Abstract functions in a parent CFC may not be invoked in a subclass via the SUPER keyword.
  • Abstract CFCs may be specified as the type in a CFARGUMENT tag, or as the returntype in a CFFUNCTION tag.

CFC Interfaces

  • As with abstract CFCs, if a CFC is of type INTERFACE it may not be instantiated via CFOBJECT or CreateObject().
  • Interfaces may only contain abstract functions.
  • An interface may extend another interface.
  • An interface may not extend an abstract or concrete CFC.
  • A CFC declares that it implements one or more interfaces by using the IMPLEMENTS attribute of the CFCOMPONENT tag.
    • If multiple interfaces are implemented, IMPLEMENTS is a comma-separated list of interfaces.
  • A CFC implementing an interface must implement all abstract functions defined in the interface.
  • An interface may be specified as the type in a CFARGUMENT tag, or as the returntype in a CFFUNCTION tag.

Personal tools