24 lines
425 B
PHP
Executable File
24 lines
425 B
PHP
Executable File
<?php
|
|
|
|
namespace itguild\forms\form\traits;
|
|
|
|
trait CreateParams
|
|
{
|
|
|
|
/**
|
|
* @param array $data
|
|
* @return string
|
|
*/
|
|
public function createParams(array $data = []): string
|
|
{
|
|
$paramsString = "";
|
|
foreach($data as $key => $param){
|
|
if(is_string($param)){
|
|
$paramsString .= $key . "='" . $param . "'";
|
|
}
|
|
}
|
|
|
|
return $paramsString;
|
|
}
|
|
|
|
} |