Created
February 23, 2012 11:50
-
-
Save sineld/1892524 to your computer and use it in GitHub Desktop.
Sinan helper class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php defined('SYSPATH') or die('No direct script access.'); | |
/** | |
* Sinan helper class. | |
* | |
* $Id: sinan.php 1.0 2012-02-22 20:06:38Z Geert $ | |
* | |
* @package Sinan | |
* @author Sinan Eldem | |
* @copyright (c) 2012 Sinan Eldem | |
* @license http://kohanaphp.com/license.html | |
*/ | |
class SINAN{ | |
/** | |
* Cleans special chars from phone number. | |
* | |
* @param string phone number | |
* @return string | |
*/ | |
public static function tel($tel) | |
{ | |
return str_replace(array('(', ')', ' ', '-'), array(''), $tel); | |
} | |
public static function tarih($tarih) | |
{ | |
$tar = explode('-', $tarih); | |
return $tar[2].'-'.$tar[1].'-'.$tar[0]; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment