\LibUrl

STNC FW

Copyright (c) 2015

Author(s): Selman TUNÇ www.selmantunc.com selmantunc@gmail.com url yani link gibi yonlendirme ile ilgili kodlar bulunur

Summary

Methods
Properties
Constants
redirect()
templatePath()
adminTemplatePath()
publicPath()
autolink()
generateSafeSlug()
productLink()
urunlerLink()
previous()
getCurrentUrl()
TumLinkiTemizle()
SortLink()
PaginationLink()
MarkaLink()
FilterLink()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
LinkTemizle()
URLunique()
No private properties found
N/A

Methods

redirect()

redirect(string  $url = null, boolean  $fullpath = false) 

Redirect to chosen url

Parameters

string $url

the url to redirect to

boolean $fullpath

if true use only url in redirect instead of using DIR

templatePath()

templatePath() : string

created the absolute address to the template folder

Returns

string —

url to template folder

adminTemplatePath()

adminTemplatePath() 

publicPath()

publicPath() : string

css img js klasorunünü verir .

..

Returns

string

autolink()

autolink(string  $text, string  $custom = null) : string

converts plain text urls into HTML links, second argument will be used as the url label <a href=''>$custom</a>

Parameters

string $text

data containing the text to read

string $custom

if provided, this is used for the link label

Returns

string —

returns the data with links created around urls

generateSafeSlug()

generateSafeSlug(  $slug) : mixed|string

This function converts and url segment to an safe one, for example: `test name @132` will be converted to `test-name--123` Basicly it works by replacing every character that isn't an letter or an number to an dash sign It will also return all letters in lowercase

Parameters

$slug

- The url slug to convert

Returns

mixed|string

productLink()

productLink(  $stokisim,   $id) 

Parameters

$stokisim
$id

urunlerLink()

urunlerLink(  $kategori) 

Parameters

$kategori

previous()

previous() 

Go to the previous url.

getCurrentUrl()

getCurrentUrl() 

TumLinkiTemizle()

TumLinkiTemizle() : string

link içindeki key value değerlerini siler

Returns

string

Examples

) sonuc = http://smvc.dev/kategori/gida_ve_icecek
** File not found : TumLinkiTemizle(http://smvc.dev/kategori/gida_ve_icecek?page=2&m=&cinsiyet=erkek **

SortLink()

SortLink(string  $sort) : string

sort linkleri ile ilgili işlemlerin yapılacağı kısım

Parameters

string $sort

Returns

string

PaginationLink()

PaginationLink() : string

pagination kısmını linkler

Returns

string

MarkaLink()

MarkaLink(string  $eklenecek_kelime,   $link_kaldir = false) : string

marka linkleri ile ilgili işlemlerin yapılacağı kısım

Parameters

string $eklenecek_kelime
$link_kaldir

Returns

string

FilterLink()

FilterLink(  $ozellik,   $deger) : string

marka linkleri ile ilgili işlemlerin yapılacağı kısım

Parameters

$ozellik
$deger

Returns

string

LinkTemizle()

LinkTemizle(  $url) : string

link içindeki boş olan key değerlerinin sileri

Parameters

$url

Returns

string

Examples

) sonuc = http://smvc.dev/kategori/gida_ve_icecek?page=2&cinsiyet=erkek
** File not found : LinkTemizle(http://smvc.dev/kategori/gida_ve_icecek?page=2&m=&cinsiyet=erkek **

URLunique()

URLunique(  $url) : string

url de tekrar eden query değerlerini siler

Parameters

$url

Returns

string

Examples

** File not found :  **