首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > 其他 > 不同的项目

不同的项目

  • 资源大小:38.00 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: php php5 List collection iterator

资 源 简 介

Collection of projects by Johan Nilsson The Base Project currently contains the follwing classes. Base_List Base_List_Iterator Base_List_Exception Base_Iterator Example usage: ``` // Dummy example object class Item { private $_name = ""; public function construct($name) { $this->name = $name; } public function getName() { return $this->_name; } } $list = new Base_List(); $list->attach(new Item("a"))->attach(new Item("b"))->attach(new Item("c")); $list->prepend(new Item("d"), "key")->prepend(new Item("e")); echo $list->first()->getName() . " "; echo $list->last()->getName() . " "; foreach ($list as $item) { echo $item->getName() . " "; } echo count($list); ```

文 件 列 表

.cache
.dataModel
Base
List
Exception.php
List.php
Iterator
Iterator.php
build.properties
build.xml
Tests
tests.php
VIP VIP
0.192120s