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

Class: AutoloaderIndex_SerializedHashtable

Source Location: /classes/index/AutoloaderIndex_SerializedHashtable.php

Class Overview

AutoloaderIndex
   |
   --AutoloaderIndex_SerializedHashtable

The index is a serialized hashtable.


Author(s):

Version:

  • 1.1

Copyright:

  • Copyright (C) 2010 Markus Malkusch

Methods


Child classes:

AutoloaderIndex_SerializedHashtable_GZ
The index is a compressed serialized hashtable.

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 51]
The index is a serialized hashtable.

This index is working in every PHP environment. It should be fast enough for most applications. The index is a file in the temporary directory. The content of this file is a serialized Hashtable.

This implementation is threadsafe.




Tags:

author:  Markus Malkusch <markus@malkusch.de>
version:  1.1
copyright:  Copyright (C) 2010 Markus Malkusch
see:  unserialize()
see:  serialize()


[ Top ]


Class Methods


method delete [line 106]

void delete( )

Deletes the index file



Tags:

throws:  AutoloaderException_Index Deleting failed
access:  public


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

[ Top ]

method getIndexPath [line 87]

String getIndexPath( )

Get the path of the index file.



Tags:

return:  The path to the index file
see:  AutoloaderIndex_SerializedHashtable::setIndexPath()
access:  public


[ Top ]

method getPath [line 210]

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 hasPath [line 246]

bool hasPath( String $class)



Tags:

throws:  AutoloaderException_Index
access:  public


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

Parameters:

String   $class  

[ Top ]

method readFile [line 149]

String readFile( $file)



Tags:

throws:  AutoloaderException_Index_IO
access:  protected


Overridden in child classes as:

AutoloaderIndex_SerializedHashtable_GZ::readFile()

Parameters:

   $file  

[ Top ]

method save [line 172]

void save( )



Tags:

throws:  AutoloaderException_Index_IO
since:  1.1 save() is threadsafe.
access:  public


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

[ Top ]

method saveFile [line 163]

int saveFile( $file, $serializedIndex)



Tags:

return:  written Bytes
throws:  AutoloaderException_Index_IO
access:  protected


Overridden in child classes as:

AutoloaderIndex_SerializedHashtable_GZ::saveFile()

Parameters:

   $file  
   $serializedIndex  

[ Top ]

method setIndexPath [line 75]

void setIndexPath( String $path)

Set the path to the index file.

Setting the index file path is optional. Per default it will be a file in the temporary directory. Its prefix is AutoloaderIndex_SerializedHashtable::FILE_PREFIX.




Tags:



Parameters:

String   $path   the path to the index file

[ Top ]

method _setPath [line 225]

void _setPath( String $class, String $path)



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 235]

void _unsetPath( String $class)



Tags:

throws:  AutoloaderException_Index
access:  protected


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

Parameters:

String   $class  

[ Top ]


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