* zin: refactor to compatible with php 5.4.
# Conflicts: # module/instance/ui/view.html.php # module/repo/ui/monaco.html.php
This commit is contained in:
@@ -18,13 +18,13 @@ class set
|
||||
{
|
||||
public static function __callStatic($prop, $args)
|
||||
{
|
||||
if($prop === 'class' || strtolower($prop) === 'classname')
|
||||
{
|
||||
return directive('prop', array('class' => $args));
|
||||
}
|
||||
|
||||
$value = array_shift($args);
|
||||
if(is_object($value)) $value = (array)$value;
|
||||
return directive('prop', array($prop => $value));
|
||||
}
|
||||
|
||||
public static function class(/* ...$args */)
|
||||
{
|
||||
return directive('prop', array('class' => func_get_args()));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user