A
[ class tree: A ] [ index: A ] [ all elements ]

Class: A_Locator

Source Location: /Locator.php

Class Overview


A_Locator


Variables

Constants

Methods



Class Details

[line 15]
A_Locator

Registry plus Loader




[ Top ]


Class Variables

$_dir = array()

[line 26]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_dir_regexp = array()

[line 27]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_extension =  '.php'

[line 29]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_inject = array()

[line 28]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_obj = array()

[line 24]



Tags:

access:  protected

Type:   mixed


[ Top ]

$_reg = array()

[line 25]



Tags:

access:  protected

Type:   mixed


[ Top ]



Class Methods


constructor __construct [line 31]

A_Locator __construct( [ $dir = false])



Tags:

access:  public


Parameters:

   $dir  

[ Top ]

method autoload [line 292]

void autoload( )



Tags:

access:  public


[ Top ]

method get [line 174]

unknown get( [string $name = ''], [string $class = ''], [string $baseclass = ''])

Get object from registery by name. If name does not exist and class given then will attempt to load/instatiate baseclass is used to lookup DI information, if baseclass is '*' then it will search for info by parent classes/interfaces



Tags:

access:  public


Parameters:

string   $name  
string   $class  
string   $baseclass  

[ Top ]

method has [line 287]

void has( $name)



Tags:

access:  public


Parameters:

   $name  

[ Top ]

method loadClass [line 114]

unknown loadClass( [string $class = ''], [string $dir = ''], [boolean $autoload = false])

Load class using PEAR name to path rules.



Tags:

access:  public


Parameters:

string   $class   name
string   $dir   from which to load class
boolean   $autoload   triggered when class_exists() check done?

[ Top ]

method newInstance [line 206]

object instantiated newInstance( [string $class = ''], [string $baseclass = ''])

load class and create instance



Tags:

access:  public


Parameters:

string   $class  
string   $baseclass   is the name to lookup in DI registry, or '*' to search parent classes/interfaces

[ Top ]

method register [line 93]

$this register( string $dl)

Regiser DI information to allow injecting via constructor or setters.

Calls to get() will then use this information to inject as specified.

Example:




Tags:

access:  public


Parameters:

string   $dl  

[ Top ]

method set [line 277]

void set( $name, $value)



Tags:

access:  public


Parameters:

   $name  
   $value  

[ Top ]

method setDir [line 57]

$this setDir( string $dir, [string $namespace = ''])

Set a directory to used for class names that:

  1. namespace '' the dir from which to load when do match is found
  2. matched first part of PEAR class name 'Foo_*' or namespace '\Foo\'
  3. match a perl regex like '/^Foo.*$/'




Tags:

access:  public


Parameters:

string   $dir  
string   $namespace  

[ Top ]


Class Constants

CONFIG =  'Config'

[line 19]


[ Top ]

MAPPER =  'Mapper'

[line 20]


[ Top ]

REQUEST =  'Request'

[line 21]


[ Top ]

RESPONSE =  'Response'

[line 22]


[ Top ]



Documentation generated on Sun, 24 Jul 2011 00:03:31 +0000 by phpDocumentor 1.4.3