Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function debug($string)
- {
- $separator = (php_sapi_name() == 'cli') ? "\n" : "<br>";
- echo $string . $separator;
- }
- Class Channel
- {
- public static $channel;
- public static function create($channel)
- {
- self::$channel[] = $channel;
- return new static;
- }
- public static function getListByName()
- {
- sort(self::$channel);
- return new static;
- }
- public function getName()
- {
- }
- }
- $gaul = Channel::create('Channel Gaul');
- $lebay = Channel::create('Channel Lebay');
- $alay = Channel::create('Channel Alay');
- foreach (Channel::getListByName() as $availableChannel) {
- debug($availableChannel->getName());
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement