blob: 181af8a4faf57f4a233a9e6863818b52418e7da8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
<?php
class OC_APP{
static private $init = false;
static private $apps = array();
/**
*
*/
public static function init(){
// Get all appinfo
$dir = opendir( $SERVERROOT );
while( false !== ( $filename = readdir( $dir ))){
if( substr( $filename, 0, 1 ) != '.' ){
if( file_exists( "$SERVERROOT/$filename/appinfo.php" )){
oc_require( "$filename/appinfo.php" );
}
}
}
closedir( $dir );
// return
return true;
}
/**
*
*/
public static function register( $data = array()){
OC_APP::$apps[] = $data;
}
/**
*
*/
public static function list(){
return OC_APP::$apps[];
}
}
?>
|