• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP BaseClass类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中BaseClass的典型用法代码示例。如果您正苦于以下问题:PHP BaseClass类的具体用法?PHP BaseClass怎么用?PHP BaseClass使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了BaseClass类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: testCopyPrivatePropertyFromSubClassObject

 public function testCopyPrivatePropertyFromSubClassObject()
 {
     $obj1 = new SubClass();
     $obj1->setPrivateProperty('Modified private property value of BaseClass');
     $obj2 = new BaseClass();
     $obj2->copyPrivateProperty($obj1);
     $this->assertEquals('Modified private property value of BaseClass', $obj2->getPrivateProperty());
     $obj3 = new SubClass();
     $obj3->copyPrivateProperty($obj1);
     $this->assertEquals('Modified private property value of BaseClass', $obj3->getPrivateProperty());
 }
开发者ID:beeare,项目名称:ObjectOrientedPHP,代码行数:11,代码来源:InheritanceTest.php


示例2: Controller

 /**
  * 加载控制器
  */
 public static function Controller($class, $isView = false, $isMuti = false, $functionName = null)
 {
     $class = str_replace(array('.', '#'), array('\\', '.'), $class);
     if ($isView) {
         self::$isView = true;
         self::$isViewMuti = $isMuti;
     }
     BaseClass::$functionName = $functionName;
     return self::getClass("\\AppMain\\controller\\" . $class . "Controller");
 }
开发者ID:phpchen,项目名称:yiyuangou,代码行数:13,代码来源:Router.class.php


示例3: testUnbind

 function testUnbind()
 {
     global $eArgs, $eData;
     $eArgs = $eData = null;
     $args = 'This is a test';
     $data = array(1, 2, 4, 5);
     $base = new BaseClass();
     $base->bind('firstevent', 'test_callback');
     $base->bind('secondevent', $data, 'test_callback');
     $base->unbind('firstevent');
     $base->trigger('firstevent', $args);
     $this->okFalse($eArgs == $args, 'Attempting to trigger first event after unbind()');
     $base->unbind('secondevent');
     $base->trigger('secondevent');
     $this->okFalse($eData === $data, 'Attempting to trigger second event after unbind()');
 }
开发者ID:enriqueism,项目名称:raxan,代码行数:16,代码来源:raxanbase.test.php


示例4:

	public function
	save() {
		if (!$this->id) {
			return $this->create();
		}
		return parent::save();
	}
开发者ID:Naddiseo,项目名称:WW2Game,代码行数:7,代码来源:Message.php


示例5:

	public function
	create() {
		if (!$this->weaponCount or $this->weaponCount <= 0) {
			return 0;
		}
		return parent::create();
	}
开发者ID:Naddiseo,项目名称:WW2Game,代码行数:7,代码来源:Weapon.php


示例6: loadFromDB

 function loadFromDB($id)
 {
     $ret = parent::loadFromDB($id);
     global $_CONF;
     $this->invitationExpired = strtotime($this->invitationDate) < strtotime('now');
     $this->Active = $this->invitationActive && !$this->invitationExpired;
     return $ret;
 }
开发者ID:alex-k,项目名称:velotur,代码行数:8,代码来源:Invitations_class.php


示例7: test

 public function test($tmp = null)
 {
     echo "childClass::sss";
     parent::test();
     self::called();
     echo self::CONST_VALUE;
     echo static::$sValue1;
 }
开发者ID:lilili001,项目名称:think,代码行数:8,代码来源:class06_1.php


示例8: __construct

 /**
  * 
  */
 public function __construct($id, $name, $css_class, $script)
 {
     parent::__construct();
     $this->id = $id;
     $this->name = $name;
     $this->css_class = $css_class;
     $this->script = $script;
 }
开发者ID:alsimfer,项目名称:HomePage,代码行数:11,代码来源:Table.php


示例9: array

 function __construct($attributes = array(), $entities = array())
 {
     $this->entities = array();
     foreach ($entities as $entity) {
         $this->append($entity->copy());
     }
     parent::__construct($attributes);
 }
开发者ID:k3rn3l3rr0r,项目名称:dxfwriter,代码行数:8,代码来源:Collection.php


示例10: __construct

 /**
  * 
  */
 public function __construct($id, $name, $css_class, $checked = FALSE)
 {
     parent::__construct();
     $this->id = $id;
     $this->name = $name;
     $this->css_class = $css_class;
     $this->checked = $checked;
 }
开发者ID:alsimfer,项目名称:HomePage,代码行数:11,代码来源:Checkbox.php


示例11: __construct

 public function __construct($key, $quantity, $price)
 {
     parent::__construct();
     $this->_key = $key;
     $this->_quantity = $quantity;
     $this->_price = $price;
     $this->_features = array();
 }
开发者ID:gotnospirit,项目名称:php-dpat,代码行数:8,代码来源:CaddyItem.php


示例12: __construct

 public function __construct($page_id)
 {
     parent::__construct();
     if ($page_id != NULL) {
         $page_id = (int) $page_id;
         util_Validator::validate($page_id, 'integer');
         $this->init($page_id);
     }
 }
开发者ID:alsimfer,项目名称:HomePage,代码行数:9,代码来源:Page.php


示例13: __construct

 public function __construct($shipment_id = 0)
 {
     parent::__construct();
     if ((int) $shipment_id > 0) {
         $shipment_id = (int) $shipment_id;
         util_Validator::validate($shipment_id, 'integer');
         $this->init($shipment_id);
     }
 }
开发者ID:alsimfer,项目名称:HomePage,代码行数:9,代码来源:Shipment.php


示例14: array

 function __construct($attributes = array())
 {
     $defaults = array();
     $defaults['name'] = 'Writer';
     $defaults['flag'] = 64;
     $defaults['color'] = 7;
     $defaults['lineType'] = 'continuous';
     parent::__construct(array_merge($defaults, $attributes));
 }
开发者ID:k3rn3l3rr0r,项目名称:dxfwriter,代码行数:9,代码来源:Layer.php


示例15:

 /**
  * Constructor
  *
  * Initialize things.
  *
  */
 function __construct()
 {
     if (null == self::$_appInstance) {
         self::$_appInstance = Slim::getInstance();
     }
     if (null == self::$_dbInstance) {
         self::$_dbInstance = PDOAdpter::getInstance();
     }
 }
开发者ID:edupol,项目名称:examsystem,代码行数:15,代码来源:BaseClass.php


示例16: array

 function __construct($id = false)
 {
     $this->_table = "Partners";
     $this->_idfield = "partnerID";
     $this->_LINKED = array();
     $this->_FIELDTYPES = array('partnerID' => 'hidden');
     $this->_CHECKFIELDS = array('partnerID' => 'required', 'partnerName' => 'required');
     $this->_FIELDNAMES = array('partnerID' => '#', 'partnerName' => 'Имя/название');
     return parent::__construct($id);
 }
开发者ID:alex-k,项目名称:velotur,代码行数:10,代码来源:Partners_class.php


示例17: loadFromHTML

 function loadFromHTML($data = false)
 {
     global $_POST;
     if (isset($_POST[formSubmit])) {
         $this->tripShowAvPlaces = 0;
         $this->tripHidden = 0;
         $this->langRU = 0;
         $this->langEN = 0;
     }
     return parent::loadFromHTML($data);
 }
开发者ID:alex-k,项目名称:velotur,代码行数:11,代码来源:Trips_class.php


示例18: __construct

 /**
  * 
  */
 public function __construct($id, $name, $css_class, $selected_id = 0, $placeHolder = '')
 {
     parent::__construct();
     $this->id = $id;
     $this->name = $name;
     $this->css_class = $css_class;
     $this->placeHolder = $placeHolder;
     if ((int) $selected_id > 0) {
         $this->selected_id = $selected_id;
     }
 }
开发者ID:alsimfer,项目名称:HomePage,代码行数:14,代码来源:SelectField.php


示例19: updateDB

 function updateDB()
 {
     $ret = parent::updateDB();
     $this->loadLinkedFromDB();
     if (is_array($this->Tours)) {
         foreach ($this->Tours as $t) {
             $t->loadFromHTML();
             $t->updateDB();
         }
     }
     return $ret;
 }
开发者ID:alex-k,项目名称:velotur,代码行数:12,代码来源:Guides_class.php


示例20: array

 function __construct($attributes = array())
 {
     $defaults = array();
     $defaults['name'] = 'continuous';
     $defaults['flag'] = 64;
     $defaults['description'] = 'Solid line';
     // TODO: Implement lineType elements
     //length (49),
     //elementType Complex linetype element (74)
     // shapeNo shape numeber (75)
     $defaults['elements'] = array();
     parent::__construct(array_merge($defaults, $attributes));
 }
开发者ID:k3rn3l3rr0r,项目名称:dxfwriter,代码行数:13,代码来源:LineType.php



注:本文中的BaseClass类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP BaseController类代码示例发布时间:2022-05-23
下一篇:
PHP BaseActiveRecordVersioned类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap