src/Fields/Field.php
public static function create($args, $values)
    {
        $type = is_array($args) ? $args['type'] : $args;
        $class = str_replace(' ', '', ucwords(str_replace('_', ' ', $type)));
        $class = "Gizburdt\\Cuztom\\Fields\\$class";

        if (class_exists($class)) {
            $field = new $class($args, $values);

            Cuztom::addField($field);

            return $field;
        }

        return false;
    }
public static function create($args, $values)
    {
        $type = is_array($args) ? $args['type'] : $args;
        $class = str_replace(' ', '', ucwords(str_replace('_', ' ', $type)));
        $class = "Gizburdt\\Cuztom\\Fields\\$class";

        if (class_exists($class)) {
            $field = new $class($args, $values);

            Cuztom::addField($field);

            return $field;
        }

        return false;
    }
public static function create ( $ args , $ values ) { $ type = is_array ( $ args ) ? $ args [ 'type' ] : $ args ; $ class = str_replace ( ' ' , '' , ucwords ( str_replace ( '_' , ' ' , $ type ) ) ) ; $ class = "Gizburdt\\Cuztom\\Fields\\$class" ; if ( class_exists ( $ class ) ) { $ field = new $ class ( $ args , $ values ) ; Cuztom :: addField ( $ field ) ; return $ field ; } return false ; }
Creates and returns a field object.

@param  array       $args
@return object|bool
Creates and returns a field object .