Improvements to field views and minor updates
This commit is contained in:
20
classes/lnApp/Arr.php
Normal file
20
classes/lnApp/Arr.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php defined('SYSPATH') or die('No direct access allowed.');
|
||||
|
||||
/**
|
||||
* This class extends Kohana's Arr
|
||||
*
|
||||
* @package lnApp
|
||||
* @category Modifications
|
||||
* @author Deon George
|
||||
* @copyright (c) 2010 Deon George
|
||||
* @license http://dev.leenooks.net/license.html
|
||||
*/
|
||||
abstract class lnApp_Arr extends Kohana_Arr {
|
||||
/**
|
||||
* Convert an array into a string with key=value
|
||||
*/
|
||||
public static function convert(array $array) {
|
||||
return implode(' ',array_map(function ($v, $k) { return sprintf('%s="%s"', $k, $v); },$array,array_keys($array)));
|
||||
}
|
||||
}
|
||||
?>
|
Reference in New Issue
Block a user