Login   Register  
PHP Classes
elePHPant
Icontem

File: functions/local.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Mike  >  PHP Socializer  >  functions/local.php  >  Download  
File: functions/local.php
Role: Auxiliary script
Content type: text/plain
Description: Configuration script
Class: PHP Socializer
Embed social buttons and widgets in Web pages
Author: By
Last change:
Date: 1 year ago
Size: 703 bytes
 

Contents

Class file image Download
<?php
namespace COI\Social;

function 
getClassName($object) {
    if (!
is_object($object) && !is_string($object)) {
        return 
false;
    }

    return 
trim(strrchr((is_string($object) ? $object get_class($object)), '\\'), '\\');
}

function 
getCurrentUrl() {
    if (!isset(
$_SERVER)) {
        return 
'';
    }
    
$pageURL 'http';

    if (isset(
$_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
        
$pageURL .= 's';
    }

    
$pageURL .= '://';

    if (
$_SERVER['SERVER_PORT'] != '80') {
        
$pageURL .= $_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].$_SERVER['REQUEST_URI'];
    } else {
        
$pageURL .= $_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];
    }
    return 
$pageURL;
}