Blesta
  • Package
  • Class
  • Tree
  • Deprecated

Packages

  • blesta
    • app
      • components
        • events
          • default
      • controllers
      • models
    • components
      • auth
      • delivery
        • interfax
        • postal
          • methods
      • download
      • email
      • exchange
        • rates
          • foxrate
          • google
            • finance
          • yahoo
            • finance
      • gateway
        • payments
      • gateways
      • invoice
        • delivery
        • templates
      • json
      • modules
      • net
        • http
        • net
          • amazon
            • s3
          • geo
            • ip
      • plugins
      • recaptcha
      • security
      • session
        • cart
      • settingscollection
      • upgrades
      • upload
      • vcard
    • helpers
      • currency
        • format
      • data
        • structure
          • array
          • string
      • text
        • parser
  • com
    • tecnick
      • tcpdf
        • blesta
          • components
            • invoice
              • templates
                • quickbooks
                  • invoice
                • templates
                  • default
  • Crypt
    • AES
    • DES
    • Hash
    • Random
    • RC4
    • Rijndael
    • RSA
    • TerraDES
  • File
    • ANSI
    • ASN1
    • X509
  • Math
    • BigInteger
  • minPHP
    • components
      • input
      • record
    • helpers
      • color
      • data
        • structure
      • date
      • html
      • xml
    • lib
  • Net
    • SFTP
    • SSH1
    • SSH2
  • None
  • PHP
  • PHPMailer
  • Services
    • JSON
  • Swift
    • ByteStream
    • CharacterStream
    • Encoder
    • Events
    • KeyCache
    • Mailer
    • Mime
    • Plugins
    • Transport

Classes

  • Swift
  • Swift_ConfigurableSpool
  • Swift_DependencyContainer
  • Swift_FileSpool
  • Swift_Mailer
  • Swift_MemorySpool
  • Swift_NullTransport
  • Swift_Preferences
  • Swift_SpoolTransport
  • Swift_StreamFilters_ByteArrayReplacementFilter
  • Swift_StreamFilters_StringReplacementFilter
  • Swift_StreamFilters_StringReplacementFilterFactory
  • Swift_Transport_NullTransport
  • Swift_Transport_SpoolTransport
  • Swift_Validate

Interfaces

  • Swift_Filterable
  • Swift_ReplacementFilterFactory
  • Swift_Spool
  • Swift_StreamFilter

Exceptions

  • Swift_DependencyException
  • Swift_IoException
  • Swift_RfcComplianceException
  • Swift_SwiftException

Class Swift_DependencyContainer

Dependency Injection container.

Package: Swift
Author: Chris Corbyn
Located at vendors/swiftmailer/lib/classes/Swift/DependencyContainer.php

Methods summary

public
# __construct( )

Constructor should not be used. Use Swift_DependencyContainer::getInstance() instead.

Constructor should not be used. Use Swift_DependencyContainer::getInstance() instead.

public static Swift_DependencyContainer
# getInstance( )

Returns a singleton of the DependencyContainer.

Returns a singleton of the DependencyContainer.

Returns

Swift_DependencyContainer
public array
# listItems( )

List the names of all items stored in the Container.

List the names of all items stored in the Container.

Returns

array
public boolean
# has( string $itemName )

Test if an item is registered in this container with the given name.

Test if an item is registered in this container with the given name.

Parameters

$itemName
string
$itemName

Returns

boolean

See

Swift_DependencyContainer::register()
public mixed
# lookup( string $itemName )

Lookup the item with the given $itemName.

Lookup the item with the given $itemName.

Parameters

$itemName
string
$itemName

Returns

mixed

Throws

Swift_DependencyException
If the dependency is not found

See

Swift_DependencyContainer::register()
public array
# createDependenciesFor( string $itemName )

Create an array of arguments passed to the constructor of $itemName.

Create an array of arguments passed to the constructor of $itemName.

Parameters

$itemName
string
$itemName

Returns

array
public Swift_DependencyContainer
# register( string $itemName )

Register a new dependency with $itemName. This method returns the current DependencyContainer instance because it requires the use of the fluid interface to set the specific details for the dependency.

Register a new dependency with $itemName. This method returns the current DependencyContainer instance because it requires the use of the fluid interface to set the specific details for the dependency.

Parameters

$itemName
string
$itemName

Returns

Swift_DependencyContainer

See

Swift_DependencyContainer::asNewInstanceOf(), Swift_DependencyContainer::asSharedInstanceOf(), Swift_DependencyContainer::asValue()
public Swift_DependencyContainer
# asValue( mixed $value )

Specify the previously registered item as a literal value. Swift_DependencyContainer::register() must be called before this will work.

Specify the previously registered item as a literal value. Swift_DependencyContainer::register() must be called before this will work.

Parameters

$value
mixed
$value

Returns

Swift_DependencyContainer
public Swift_DependencyContainer
# asAliasOf( string $lookup )

Specify the previously registered item as an alias of another item.

Specify the previously registered item as an alias of another item.

Parameters

$lookup
string
$lookup

Returns

Swift_DependencyContainer
public Swift_DependencyContainer
# asNewInstanceOf( string $className )

Specify the previously registered item as a new instance of $className. Swift_DependencyContainer::register() must be called before this will work. Any arguments can be set with Swift_DependencyContainer::withDependencies(), Swift_DependencyContainer::addConstructorValue() or Swift_DependencyContainer::addConstructorLookup().

Specify the previously registered item as a new instance of $className. Swift_DependencyContainer::register() must be called before this will work. Any arguments can be set with Swift_DependencyContainer::withDependencies(), Swift_DependencyContainer::addConstructorValue() or Swift_DependencyContainer::addConstructorLookup().

Parameters

$className
string
$className

Returns

Swift_DependencyContainer

See

Swift_DependencyContainer::withDependencies(), Swift_DependencyContainer::addConstructorValue(), Swift_DependencyContainer::addConstructorLookup()
public Swift_DependencyContainer
# asSharedInstanceOf( string $className )

Specify the previously registered item as a shared instance of $className. Swift_DependencyContainer::register() must be called before this will work.

Specify the previously registered item as a shared instance of $className. Swift_DependencyContainer::register() must be called before this will work.

Parameters

$className
string
$className

Returns

Swift_DependencyContainer
public Swift_DependencyContainer
# withDependencies( array $lookups )

Specify a list of injected dependencies for the previously registered item. This method takes an array of lookup names.

Specify a list of injected dependencies for the previously registered item. This method takes an array of lookup names.

Parameters

$lookups
array
$lookups

Returns

Swift_DependencyContainer

See

Swift_DependencyContainer::addConstructorValue(), Swift_DependencyContainer::addConstructorLookup()
public Swift_DependencyContainer
# addConstructorValue( mixed $value )

Specify a literal (non looked up) value for the constructor of the previously registered item.

Specify a literal (non looked up) value for the constructor of the previously registered item.

Parameters

$value
mixed
$value

Returns

Swift_DependencyContainer

See

Swift_DependencyContainer::withDependencies(), Swift_DependencyContainer::addConstructorLookup()
public Swift_DependencyContainer
# addConstructorLookup( string $lookup )

Specify a dependency lookup for the constructor of the previously registered item.

Specify a dependency lookup for the constructor of the previously registered item.

Parameters

$lookup
string
$lookup

Returns

Swift_DependencyContainer

See

Swift_DependencyContainer::withDependencies(), Swift_DependencyContainer::addConstructorValue()
private
# _getValue( mixed $itemName )

Get the literal value with $itemName

Get the literal value with $itemName

private
# _createAlias( mixed $itemName )

Resolve an alias to another item

Resolve an alias to another item

private
# _createNewInstance( mixed $itemName )

Create a fresh instance of $itemName

Create a fresh instance of $itemName

private
# _createSharedInstance( mixed $itemName )

Create and register a shared instance of $itemName

Create and register a shared instance of $itemName

private &
# _getEndPoint( )

Get the current endpoint in the store

Get the current endpoint in the store

private
# _resolveArgs( array $args )

Get an argument list with dependencies resolved

Get an argument list with dependencies resolved

private
# _lookupRecursive( mixed $item )

Resolve a single dependency with an collections

Resolve a single dependency with an collections

Magic methods summary

Constants summary

integer TYPE_VALUE 0x0001
#

Constant for literal value types

Constant for literal value types

integer TYPE_INSTANCE 0x0010
#

Constant for new instance types

Constant for new instance types

integer TYPE_SHARED 0x0100
#

Constant for shared instance types

Constant for shared instance types

integer TYPE_ALIAS 0x1000
#

Constant for aliases

Constant for aliases

Properties summary

private static mixed $_instance
#

Singleton instance

Singleton instance

private array $_store
#

The data container

The data container

private mixed $_endPoint
#

The current endpoint in the data container

The current endpoint in the data container

Blesta API documentation generated by ApiGen 2.8.0