Kaydet (Commit) e6c3ba9e authored tarafından Ali Yılmaz's avatar Ali Yılmaz 🎯

Syntax updated.

üst 7ec01fc1
......@@ -1176,27 +1176,31 @@ class Mind {
* @return mixed|bool
*
*/
public function pGenerator($str){
public function pGenerator($str=null){
$Result = array();
if(strstr($str, ':')){
$strExplode = array_filter(explode(':', trim($str, ':')));
if(count($strExplode) == 2){
list($filePath, $funcPar) = $strExplode;
$Result['name'] = $filePath;
if(strstr($funcPar, '@')){
$funcExplode = array_filter(explode('@', trim($funcPar, '@')));
} else {
$funcExplode = array($funcPar);
}
if(!empty($funcExplode)){
$Result['params'] = $funcExplode;
if(!is_null($str)){
if(strstr($str, ':')){
$strExplode = array_filter(explode(':', trim($str, ':')));
if(count($strExplode) == 2){
list($filePath, $funcPar) = $strExplode;
$Result['name'] = $filePath;
if(strstr($funcPar, '@')){
$funcExplode = array_filter(explode('@', trim($funcPar, '@')));
} else {
$funcExplode = array($funcPar);
}
if(!empty($funcExplode)){
$Result['params'] = $funcExplode;
}
}
return $Result;
} else {
$Result['name'] = $str;
}
}
return $Result;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment