EtService

Type
Class
Namespace
Craft
Inherits
Craft\EtService » Craft\BaseApplicationComponent » CApplicationComponent » CComponent
Implements
IApplicationComponent
Since
1.0

Class EtService

See also http://craftcms.com

View source

Public Properties

PropertyDescription
$behaviorsarray – The behaviors that should be attached to this component.

Public Methods

MethodDescription
__call()Calls the named method which is not a class method.
__get()Returns a property value, an event handler list or a behavior based on its name.
__isset()Checks if a property value is null.
__set()Sets value of a component property.
__unset()Sets a component property to be null.
asa()Returns the named behavior object.
attachBehavior()Attaches a behavior to this component.
attachBehaviors()Attaches a list of behaviors to the component.
attachEventHandler()Attaches an event handler to an event.
canGetProperty()Determines whether a property can be read.
canSetProperty()Determines whether a property can be set.
checkForUpdates()Checks if any new updates are available.
decodeEtModel()Creates a new EtModel with provided JSON, and returns it if it's valid.
detachBehavior()Detaches a behavior from the component.
detachBehaviors()Detaches all behaviors from the component.
detachEventHandler()Detaches an existing event handler.
disableBehavior()Disables an attached behavior.
disableBehaviors()Disables all behaviors attached to this component.
downloadUpdate()
enableBehavior()Enables an attached behavior.
enableBehaviors()Enables all behaviors attached to this component.
evaluateExpression()Evaluates a PHP expression or callback under the context of this component.
fetchCouponPrice()Fetches the price of an upgrade with a coupon applied to it.
fetchUpgradeInfo()Fetches info about the available Craft editions from Elliott.
getEventHandlers()Returns the list of attached event handlers for an event.
getIsInitialized()Checks if this application component has been initialized.
getLicenseKeyStatus()Returns the license key status, or false if it's unknown.
getLicensedDomain()Returns the domain that the installed license key is licensed for, null if it's not set yet, or false if it's unknown.
getUpdateFileInfo()
hasEvent()Determines whether an event is defined.
hasEventHandler()Checks whether the named event has attached handlers.
hasProperty()Determines whether a property is defined.
init()Initializes the application component.
isInitialized()Checks if this application component has been initialized yet, or not.
ping()
purchaseUpgrade()Attempts to purchase an edition upgrade.
raiseEvent()Raises an event.
registerPlugin()Registers a given plugin with the current Craft license.

checkForUpdates()

Checks if any new updates are available.

View source

Arguments

  • $updateInfo

Returns

Craft\EtModel, null

Signature

public Craft\EtModel, null checkForUpdates ( $updateInfo )

decodeEtModel()

Creates a new EtModel with provided JSON, and returns it if it's valid.

View source

Arguments

Returns

Craft\EtModel, null

Signature

public Craft\EtModel, null decodeEtModel ( $attributes )

downloadUpdate()

View source

Arguments

Returns

boolean

Signature

public boolean downloadUpdate ( $downloadPath, $md5, $handle )

fetchCouponPrice()

Fetches the price of an upgrade with a coupon applied to it.

View source

Arguments

  • $edition
  • $couponCode

Returns

Craft\EtModel, null

Signature

public Craft\EtModel, null fetchCouponPrice ( $edition, $couponCode )

fetchUpgradeInfo()

Fetches info about the available Craft editions from Elliott.

View source

Returns

Craft\EtModel, null

Signature

public Craft\EtModel, null fetchUpgradeInfo ( )

getLicenseKeyStatus()

Returns the license key status, or false if it's unknown.

View source

Returns

string, false

Signature

public string, false getLicenseKeyStatus ( )

getLicensedDomain()

Returns the domain that the installed license key is licensed for, null if it's not set yet, or false if it's unknown.

View source

Returns

string, null, false

Signature

public string, null, false getLicensedDomain ( )

getUpdateFileInfo()

Signature

public Craft\EtModel, null getUpdateFileInfo ( $handle )

ping()

Signature

public Craft\EtModel, null ping ( )

purchaseUpgrade()

Attempts to purchase an edition upgrade.

View source

Arguments

Returns

boolean

Signature

public boolean purchaseUpgrade ( Craft\UpgradePurchaseModel $model )

registerPlugin()

Registers a given plugin with the current Craft license.

View source

Arguments

  • $pluginHandle

Returns

Craft\EtModel

Signature

public Craft\EtModel registerPlugin ( $pluginHandle )

Constants

ConstantDescription
ENDPOINT_CHECK_FOR_UPDATES
ENDPOINT_GET_COUPON_PRICE
ENDPOINT_GET_UPDATE_FILE_INFO
ENDPOINT_GET_UPGRADE_INFO
ENDPOINT_PING
ENDPOINT_PURCHASE_UPGRADE
ENDPOINT_REGISTER_PLUGIN