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 | |
/** | |
* MemcacheHandler | |
* @author letitride | |
*/ | |
class MemcacheHandler | |
{ | |
static private $memcache = null; | |
static private $hosts = array( |
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 | |
class Object { | |
private $name; | |
public function __construct( $value ){ | |
$this->name = $value; | |
} | |
public function print_name(){ | |
print $this->name."\n"; | |
} |
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 | |
class BaseAPI { | |
static public function print_arg( $value ){ | |
print "$value \n"; | |
} | |
} | |
abstract class APIAdapter{ |
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 | |
abstract class AbstractList{ | |
protected $_count; | |
protected $_list = array(); | |
public function main(){ | |
$this->_count(); |
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 | |
class Context{ | |
static private $arg; | |
function __constract( $arg ){ | |
self::$arg = $arg; | |
} | |
public function run(){ |
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 | |
abstract class BookFactory{ | |
protected $_books = array(); | |
function create( $name, $page ){ | |
$book = $this->get_instance( $name ); | |
$book->set_page( $page ); |
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
//src=arrayの2分木検索 | |
function search_tree( $src = array(), $target, $end, $begin = false ) | |
{ | |
if( $begin === false ) | |
{ | |
$begin = floor( $end / 2 ); | |
} | |
//配列ソートする? |
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 | |
class GlobalCounter { | |
private static $instance = null; | |
private $cursol = 0; | |
private function __construct(){ | |
$this->clean(); | |
} |
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 | |
/** | |
* object hash map | |
*/ | |
class ProductManager{ | |
private $_products = array(); | |
/** hash map register */ | |
function set( $name, $product ){ |
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 | |
abstract class ListBuilder{ | |
protected $_text_count; | |
protected $_text_page; | |
abstract function set_count( $count ); | |
abstract function set_page( $page ); | |
abstract function set_list( $list ); | |
abstract function get_list_data(); |
OlderNewer