Skip to content

Commit

Permalink
add some helper function
Browse files Browse the repository at this point in the history
  • Loading branch information
alishahidi committed Jul 3, 2022
1 parent 50b32c3 commit 24f7177
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions system/Helpers/Helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,17 @@ function estimateReadingTimePrintPersian($ms)
}
}

if (!function_exists("objectToArray")) {
function objectToArray($object, $name)
{
$returnArray = [];
foreach($object as $obj){
array_push($returnArray, $obj->{$name});
}
return $returnArray;
}
}

function paginateViewRouteGenerator($routeUrl, $pageCount)
{
if (isset($_GET[0]))
Expand Down

0 comments on commit 24f7177

Please sign in to comment.