new pisilinux web sites
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<?php namespace ZN;
|
||||
/**
|
||||
* ZN PHP Web Framework
|
||||
*
|
||||
* "Simplicity is the ultimate sophistication." ~ Da Vinci
|
||||
*
|
||||
* @package ZN
|
||||
* @license MIT [http://opensource.org/licenses/MIT]
|
||||
* @author Ozan UYKUN [ozan@znframework.com]
|
||||
*/
|
||||
|
||||
class Hypertext
|
||||
{
|
||||
/**
|
||||
* Sets attributes
|
||||
*
|
||||
* @param array $attributes
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public static function attributes(array $attributes) : string
|
||||
{
|
||||
$attribute = '';
|
||||
|
||||
foreach( $attributes as $key => $values )
|
||||
{
|
||||
if( is_numeric($key) )
|
||||
{
|
||||
$attribute .= ' '.$values;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( ! empty($key) )
|
||||
{
|
||||
$attribute .= ' '.$key.'="'.$values.'"';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $attribute;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user