Skip to content

Instantly share code, notes, and snippets.

@angelov
angelov / ApplicationAspectKernel.php
Last active August 25, 2017 10:55
Trimming string arguments in commands with Go! AOP
<?php
namespace AopTest;
use Go\Core\AspectContainer;
use Go\Core\AspectKernel;
class ApplicationAspectKernel extends AspectKernel
{
protected function configureAop(AspectContainer $container)
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map.Entry;
public class HelloWorld
{
public static void main(String[] args)
{
UsersRepositoryInterface usersRepository = new UsersRepository();
@angelov
angelov / seo_friendly_url.php
Created May 7, 2011 13:32
[php] Филтрирање на стринг за seo friendly url-а
<?php
function seo_friendly_url($url) {
$cyrillic = array("а", "б", "в", "г", "д", "ѓ", "е", "ж", "з", "ѕ", "и", "ј", "к",
"л", "љ", "м", "н", "њ", "о", "п", "р", "с", "т", "ќ", "у", "ф",
"х", "ц", "ч", "џ", "ш", "А", "Б", "В", "Г", "Д", "Ѓ", "Е", "Ж",
"З", "Ѕ", "И", "Ј", "К", "Л", "Љ", "М", "Н", "Њ", "О", "П", "Р",
"С", "Т", "Ќ", "У", "Ф", "Х", "Ц", "Ч", "Џ", "Ш");