Home arrow Support arrow Documentation arrow PHP API
Login Form
 : 
 : 

Lost Password?
No account yet? Register
Also listed on
PHP API

Views : 1091    


------------- :work To be completed :work -------------

In most cases, you don't have to call this API explicitely, and your source code should not need any modification to be included in a PHK archive (except the include/require suppression). But, if you want to interact with the PHK layer (as when creating a plugin system), you will use the following API.

Please refer to the PHK_Creator API for an explanation of these methods.

1 - The PHP API

1.1 - The PHK_Mgr class

This is a static-only class. It has the responsability to manage the table of currently mounted packages. Each package is uniquely identified by a 'mount point', which is a string computed at mount time. The PHK_Mgr class contains the methods allowing to get information from its table, as well as methods to mount and umount a package.

1.1.1 - Methods

All these methods are static.

1.1.1.1 - PHK_Mgr::instance($mnt)

1.1.1.2 - PHK_Mgr::is_a_phk_uri($uri)

1.1.1.3 - PHK_Mgr::is_mounted($mnt)

1.1.1.4 - PHK_Mgr::mnt_list()

1.1.1.5 - PHK_Mgr::mount($path, [$flags])

1.1.1.6 - PHK_Mgr::umount($mnt)

1.1.1.7 - PHK_Mgr::uri_to_mnt($uri)

1.2 - The PHK class

Each PHK instance controls a package file. This package file can be a 'real' file or, in case of a subpackage a subfile of an upper(level package. There is no limit to the recursion depth of subpackages.

You get the PHK object instance by calling PHK_Mgr::instance with a mount point. This mount point is generally returned either by an include, when including a package, or by PHK_Mgr::uri_to_mnt().

1.2.1 - Methods

1.2.1.1 - accelerator_is_present()

1.2.1.2 - file_is_package($path)

1.2.1.3 - auto_file($prefix)

1.2.1.4 - auto_option($option)

1.2.1.5 - base_uri()

1.2.1.6 - is_callable_plugin_method($method)

1.2.1.7 - call_plugin_method($method [, $args,...])

1.2.1.8 - crc_check()

1.2.1.9 - flags()

1.2.1.10 - is_php_source_path($path)

1.2.1.11 - mnt()

1.2.1.12 - option($option)

1.2.1.13 - parent_mnt()

1.2.1.14 - path()

1.2.1.15 - path_list()

1.2.1.16 - plugin()

1.2.1.17 - uri($path)

1.2.1.18 - user_option($option)

1.3 - The Autoload API

The autoloader works mostly in a transparent way, loading classes when they are needed.

Unfortunately, as long as PHP does not support function and constants autoloading, it cannot transparently load the functions and constants contained in a package. So, if you want function/constant autoloading, it is possible but you will have to ask explicitely the autoloader to load them.

1.3.1 - Methods

1.3.1.1 - get_function($name)

1.3.1.2 - require_function($name)

1.3.1.3 - get_constant($name)

1.3.1.4 - require_constant($name)


Last update : Sunday, 16 September 2007

   
Quote this article in website
Print
Send to friend
Related articles
Save this to del.icio.us

Users' Comments  RSS feed comment
 

Average user rating

   (0 vote)

 


Add your comment
Name
E-mail
Title  
 
Comment
  Available characters:  
   Notify me of follow-up comments
  This image contains a scrambled text, it is using a combination of colors, font size, background, angle in order to disallow computer to automate reading. You will have to reproduce it to post on my homepage
Enter what you see:

   
   

No comment posted



mXcomment 1.0.3 © 2007-2012 - visualclinic.fr
License Creative Commons - Some rights reserved
 

All site content is (C) F. Laupretre (wishlist) - Unauthorized reproduction forbidden without express written permission.
Joomla! is Free Software released under the GNU/GPL License. - Original template design: JLM@joomlabox