modules
Packages
Interfaces
Classes
Files

Class: ModuleInterface

Source Location: /modules/module_interface.class.php [line 44]

Class Overview


This Class allow you to call methods on a ModuleInterface extended class that you're not sure of the method's availality. It also provides a set of generic methods that you could use to integrate your module with others, or allow your module to share services.

Author(s):



Class Details

This Class allow you to call methods on a ModuleInterface extended class that you're not sure of the method's availality. It also provides a set of generic methods that you could use to integrate your module with others, or allow your module to share services.

Tags:

[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Methods

constructor ModuleInterface [line 52]

ModuleInterface ModuleInterface( [string $moduleId = ''], [int $error = 0])
ModuleInterface constructor

Parameters:

string   $moduleId   the module id. It's the name of the folder in witch the module is
int   $error   allow you to instanciate your module with an error code
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method functionality [line 198]

mixed functionality( string $functionality, [mixed $args = null])
Check the existance of the functionality and if exists call it. If she's not available, the FUNCTIONNALITY_NOT_IMPLEMENTED flag is raised.

Tags:

  • return: the $functionality returns or if non-existing, false

Parameters:

string   $functionality   the name of the method you want to call
mixed   $args   the args you want to pass to the $functionality method
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_attribute [line 139]

mixed get_attribute( $attribute $attribute)

Tags:

  • return: The value of the attribute identified by the string $attribute in the intern dictionary if existing. Else, the MODULE_ATTRIBUTE_DOES_NOT_EXIST flag is raised and it returns -1

Parameters:

$attribute   $attribute   the attribute identifier in the dictionary
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_errors [line 186]

int get_errors( )

Tags:

  • return: Returns the current errors flags
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_id [line 100]

string get_id( )

Tags:

  • return: Return the id of the module
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_infos [line 124]

mixed[] get_infos( )

Tags:

  • return: All informations that you could find in the .ini file of the module, his functionalities and his name
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method get_name [line 116]

string get_name( )

Tags:

  • return: Return the name of the module
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method got_error [line 175]

returns got_error( [int $error = 0])
Returns the last error. If called with no arguments, returns true if an error has occured otherwise, false. If the method got an argument,

Tags:

  • return: true if the specified $error has occured otherwise, false.

Parameters:

int   $error   to check a specific error, 0 otherwise
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method has_functionalities [line 222]

bool has_functionalities( string[] $functionalities)
Check the availability of the functionalities (hook)

Tags:

  • return: true if all functionalities exist, false otherwise

Parameters:

string[]   $functionalities   the names of the methods you want to check the availability
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method has_functionality [line 212]

bool has_functionality( string $functionality)
Check the availability of the functionality (hook)

Tags:

  • return: true if the functionality exists, false otherwise

Parameters:

string   $functionality   the name of the method you want to check the availability
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method is_enabled [line 108]

bool is_enabled( )

Tags:

  • return: Return the true if the module is enabled
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_attribute [line 155]

void set_attribute( string $attribute, mixed $value)
Set the $value of the attribute identified by the string $attribute.

Parameters:

string   $attribute   the attribute identifier
mixed   $value   the value to set
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method set_error [line 235]

void set_error( [int $error = 0])
Set the flag error.

Parameters:

int   $error   the error flag to raised
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]

method unset_attribute [line 164]

void unset_attribute( string $attribute)
Delete the attribute and free its memory.

Parameters:

string   $attribute   the attribute identifier
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]


Class Variables

[line 282]   mixed[string]  $attributes 

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 284]   mixed  $enabled  =  false
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 277]   int  $errors 

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 272]   string[]  $functionalities 

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 257]   string  $id 

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 267]   mixed  $infos 

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
[line 262]   string  $name 

Tags:

  • access: protected
[ Top ] - [ Class Details ] - [ Methods ] - [ Variables ]
Documentation generated on Tue, 28 Jul 2009 22:43:40 +0200 by phpDocumentor 1.4.1