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

Class: AutoloaderIndex_PDO

Source Location: /classes/index/AutoloaderIndex_PDO.php

Class Overview

AutoloaderIndex
   |
   --AutoloaderIndex_PDO

The index is a PDO object.


Author(s):

Version:

  • 1.0

Copyright:

  • Copyright (C) 2010 Markus Malkusch

Constants

Methods


Inherited Methods

Class: AutoloaderIndex

AutoloaderIndex::delete()
Deletes the index
AutoloaderIndex::getContext()
The Autoloader class path context
AutoloaderIndex::getPath()
AutoloaderIndex::hasPath()
AutoloaderIndex::save()
Makes the changes to the index persistent.
AutoloaderIndex::setAutoloader()
The Autoloader calls this to set itself to this index.
AutoloaderIndex::setPath()
Set the path for the class $class to $path
AutoloaderIndex::unsetPath()
Unset the path for the class
AutoloaderIndex::_setPath()
Set the path for the class $class to $path
AutoloaderIndex::_unsetPath()
Unset the path for the class $class.
AutoloaderIndex::__destruct()
Destruction of this index will make changes persistent.

Class Details

[line 39]
The index is a PDO object.

This index uses a PDO object to store its data in any database wich understands SQL. There is no need to create any table. The index creates its structure by itself.




Tags:

author:  Markus Malkusch <markus@malkusch.de>
version:  1.0
copyright:  Copyright (C) 2010 Markus Malkusch
see:  PDO


[ Top ]


Class Methods


static method getSQLiteInstance [line 71]

static AutoloaderIndex_PDO getSQLiteInstance( [String $filename = null])

Returns an index using a SQLite database.

If no filename is given a default database in the temporary directory will be used.




Tags:

see:  AutoloaderIndex_PDO::DEFAULT_SQLITE
access:  public


Parameters:

String   $filename  

[ Top ]

constructor __construct [line 87]

AutoloaderIndex_PDO __construct( $pdo)

Initializes the index.

If the structure doesn't exist in the database it will be created. The relation for the index is autoloadindex.




Tags:

access:  public


Parameters:

PDO   $pdo  

[ Top ]

method delete [line 122]

void delete( )

deletes the relation autoloadindex.



Tags:

throws:  AutoloaderException_Index
access:  public


Overrides AutoloaderIndex::delete() (Deletes the index)

[ Top ]

method getPath [line 153]

String getPath( String $class)



Tags:

return:  The absolute path
throws:  AutoloaderException_Index_NotFound
throws:  AutoloaderException_Index
access:  public


Overrides AutoloaderIndex::getPath() (parent method not documented)

Parameters:

String   $class  

[ Top ]

method getPDO [line 112]

PDO getPDO( )



Tags:

return:  the PDO object of this index
access:  public


[ Top ]

method hasPath [line 236]

bool hasPath( String $class)



Tags:

throws:  AutoloaderException_Index
access:  public


Overrides AutoloaderIndex::hasPath() (parent method not documented)

Parameters:

String   $class  

[ Top ]

method save [line 260]

void save( )

Does nothing as _setPath() and _unsetPath() stored imediatly.



Tags:



Overrides AutoloaderIndex::save() (Makes the changes to the index persistent.)

[ Top ]

method _setPath [line 188]

void _setPath( String $class, String $path)

Stores the path imediatly persistent.

There is no sense in making the class paths persistent during save(). It is stored imediatly.




Tags:

throws:  AutoloaderException_Index
access:  protected


Overrides AutoloaderIndex::_setPath() (Set the path for the class $class to $path)

Parameters:

String   $class  
String   $path  

[ Top ]

method _unsetPath [line 216]

void _unsetPath( String $class)

Deletes the path imediatly persistent.

There is no sense in making the class paths persistent during save(). It is deleted imediatly.




Tags:

throws:  AutoloaderException_Index
access:  protected


Overrides AutoloaderIndex::_unsetPath() (Unset the path for the class $class.)

Parameters:

String   $class  

[ Top ]


Class Constants

DEFAULT_SQLITE =  "AutoloaderIndex_PDO.sqlite.db"

[line 47]

The name of the default SQLite database.



Tags:


[ Top ]



Documentation generated on Fri, 27 Nov 2009 11:36:42 +0100 by phpDocumentor 1.4.3