本文整理汇总了PHP中BaseClass类的典型用法代码示例。如果您正苦于以下问题:PHP BaseClass类的具体用法?PHP BaseClass怎么用?PHP BaseClass使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了BaseClass类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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());
}
示例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");
}
示例3:
public function
save() {
if (!$this->id) {
return $this->create();
}
return parent::save();
}
示例4:
public function
create() {
if (!$this->weaponCount or $this->weaponCount <= 0) {
return 0;
}
return parent::create();
}
示例5: 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;
}
示例6: test
public function test($tmp = null)
{
echo "childClass::sss";
parent::test();
self::called();
echo self::CONST_VALUE;
echo static::$sValue1;
}
示例7: __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;
}
示例8: array
function __construct($attributes = array(), $entities = array())
{
$this->entities = array();
foreach ($entities as $entity) {
$this->append($entity->copy());
}
parent::__construct($attributes);
}
示例9: __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;
}
示例10: __construct
public function __construct($key, $quantity, $price)
{
parent::__construct();
$this->_key = $key;
$this->_quantity = $quantity;
$this->_price = $price;
$this->_features = array();
}
示例11: __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);
}
}
示例12: __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);
}
}
示例13: 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));
}
示例14:
/**
* Constructor
*
* Initialize things.
*
*/
function __construct()
{
if (null == self::$_appInstance) {
self::$_appInstance = Slim::getInstance();
}
if (null == self::$_dbInstance) {
self::$_dbInstance = PDOAdpter::getInstance();
}
}
示例15: 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);
}