6 public function __construct()
8 $this->reposDir = $GLOBALS['phorkie']['cfg']['repos'];
14 public function createNew()
16 chdir($this->reposDir);
17 $dirs = glob('*', GLOB_ONLYDIR);
18 sort($dirs, SORT_NUMERIC);
22 $dir = $this->reposDir . '/' . $n . '/';
23 mkdir($dir, 0777);//FIXME
24 $r = new Repository();
31 * Get a list of repository objects
33 * @param integer $page Page number, beginning with 0
34 * @param integer $perPage Number of repositories per page
36 * @return array Array of Repositories
38 public function getList($page = 0, $perPage = 10)
40 chdir($this->reposDir);
41 $dirs = glob('*', GLOB_ONLYDIR);
42 sort($dirs, SORT_NUMERIC);
44 $some = array_slice($dirs, $page * $perPage, $perPage);
46 foreach ($some as $oneDir) {
47 $r = new Repository();
48 $r->loadById($oneDir);