Login   Register  
PHP Classes
elePHPant
Icontem

File: samples.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Tom Schaefer  >  QTool  >  samples.php  >  Download  
File: samples.php
Role: Example script
Content type: text/plain
Description: Some samples
Class: QTool
Manipulate text strings in several ways
Author: By
Last change: some changes
Date: 6 years ago
Size: 1,257 bytes
 

Contents

Class file image Download
<?php
include_once 'QTool.class.php';

print 
"<pre>";
$result QTool::make()
                ->
toUnderscore("MysqlBackupController")
                ->
toArray()
                ->
get();
print_r($result);
print 
"\n";

$result QTool::make()
                ->
fromArray(array("MySql","Backup","Controller"))
                ->
toCamelCase()
                ->
get();
print_r($result);
print 
"\n";

$result QTool::make()
                ->
toDot("MysqlBackupController")
                ->
get();
print_r($result);
print 
"\n";

$result QTool::make()
                ->
toUnderscore("MysqlBackupController")
                ->
toHuman()
                ->
get();
print_r($result);
print 
"\n";

$result QTool::make()
                ->
toVariable("MysqlBackupController")
                ->
get();
print_r($result);
print 
"\n";

$result QTool::make()
                ->
classType("MysqlBackupController")
                ->
get();
print_r($result);
print 
"\n";

$result QTool::make()
                ->
toNamespace("MysqlBackupController")
                ->
toArray()
                ->
get();
print_r($result);
print 
"\n";

print 
"</pre>";

/*
prints out:

Array
(
    [0] => mysql
    [1] => backup
    [2] => controller
)
MySqlBackupController
mysql.backup.controller
Mysql backup controller
mysqlBackupController
controller
Array
(
    [0] => controllers
    [1] => backups
    [2] => mysql
)

*/

?>