ICanBoogie
  • Documentation
  • API Reference
  • ActiveRecord 4.0.x
Namespaces
  • ICanBoogie
    • ActiveRecord
      • ActiveRecordCache
      • Driver
      • Property
      • Validate
        • Reader
        • Validator
        • ValidatorProvider
Classes
  • BelongsToRelation
  • Connection
  • ConnectionCollection
  • ConnectionOptions
  • HasManyRelation
  • Model
  • ModelCollection
  • ModelProvider
  • Query
  • Relation
  • RelationCollection
  • RelationNotDefined
  • Schema
  • SchemaColumn
  • Statement
  • Table
Interfaces
  • ActiveRecordCache
  • Driver
  • Exception
Exceptions
  • ActiveRecordClassNotValid
  • ConnectionAlreadyEstablished
  • ConnectionNotDefined
  • ConnectionNotEstablished
  • DriverNotDefined
  • ModelAlreadyInstantiated
  • ModelNotDefined
  • RecordNotFound
  • RecordNotValid
  • ScopeNotDefined
  • StatementInvocationFailed
  • StatementNotValid
  • UnableToSetFetchMode

Class ModelProvider

Provides a ICanBoogie\ActiveRecord\Model instance.

Namespace: ICanBoogie\ActiveRecord
Located at ActiveRecord/ModelProvider.php

Methods summary

public static define( callable $provider ) : callable

Defines the ICanBoogie\ActiveRecord\Model provider.

Defines the ICanBoogie\ActiveRecord\Model provider.

Parameters

$provider

Returns

callable
The previous provider, or null if none was defined.
public static defined( void ) : callable|null

Returns the current provider.

Returns the current provider.

Returns

callable|null
public static undefine( void )

Undefine the provider.

Undefine the provider.

public static provide( string $id ) : ICanBoogie\ActiveRecord\Model

Returns a ICanBoogie\ActiveRecord\Model instance using the provider.

Returns a ICanBoogie\ActiveRecord\Model instance using the provider.

Parameters

$id
Model identifier.

Returns

ICanBoogie\ActiveRecord\Model

Throws

ICanBoogie\ActiveRecord\ModelNotDefined
if the model cannot be provided.
ActiveRecord 4.0.x – Check on GitHub – API documentation generated by ApiGen