File: D:/HostingSpaces/SBogers10/kms.komma.pro/wwwroot/config/lang/language.class.php
<?php
/*
* en.php
* Created by Komma Mediadesign.
* Author: mike
* Date: 3/21/13
*/
class Language
{
/*
* @property array lang
*/
protected $lang = array();
/*
* Converter / LinkBuilder
* Keys have to be the same as the name of the controller/method
*/
protected $urls = array();
/*
* Constructor
*/
public function __construct(){}
/*
* Get
* @return array
*/
public function get($what = 'data')
{
if($what == 'data')
{
return $this->lang;
}
else if($what == 'url')
{
return $this->urls;
}
return false;
}
/*
* Get items
*/
/*
* Get names of all categories.
*/
protected function getItems()
{
// All basic pages
$pages = array('about');
foreach($pages as $page)
{
$items = array();
$Storage = new Storage();
$Storage->setTableName(TABLE_PREFIX . $page . '_items');
$Storage->setData(array('id'=>''));
if($result = $Storage->select())
{
// Make sure its an array
$result = fn::convert2D($result);
foreach($result as $item)
{
$items[] = 'item-' . $item['id'];
}
return $items;
}
}
return false;
}
}