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

PHP Family类代码示例

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

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



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

示例1: testExportInsideValidateMethod_ComposedClass

 public function testExportInsideValidateMethod_ComposedClass()
 {
     $f = new Family();
     $f->setFather(new Person("Pa", 46));
     $f->setMother(new Person("Ma", 40));
     $out = $this->familyValidator->validate($f);
     $this->assertEquals("Pa-Ma", $out);
 }
开发者ID:nourdine,项目名称:entitiez,代码行数:8,代码来源:ValidatorTest.php


示例2: actionCreate

 public function actionCreate()
 {
     $model = new Family();
     if (isset($_POST['Family'])) {
         $model->attributes = $_POST['Family'];
         $model->validate($model) && $model->save() && $this->redirect(Yii::app()->createUrl('family'));
     }
     $this->render('create', array('model' => $model));
 }
开发者ID:Egishe,项目名称:lifetree,代码行数:9,代码来源:FamilyController.php


示例3: setUp

 public function setUp()
 {
     $this->person = new Person("fabs", 35);
     $this->localizedPerson = new LocalizedPerson("fabs", 35, "Rue De La Roquette");
     $this->noGetEntity = new NoGetters("laurent");
     $family = new Family();
     $family->setFather(new Person("Pa", 50));
     $family->setMother(new Person("Ma", 48));
     $this->family = $family;
 }
开发者ID:nourdine,项目名称:entitiez,代码行数:10,代码来源:EntityTest.php


示例4: run

 function run()
 {
     $fp = fopen('php://output', 'w');
     header('Content-type: application/force-download');
     header("Content-Type: application/download");
     header('Content-type: text/csv');
     header('Content-Disposition: attachment; filename="jethro_' . date('Y-m-d_h:i') . '.csv"');
     $GLOBALS['system']->includeDBClass('family');
     $GLOBALS['system']->includeDBClass('person');
     switch (array_get($_REQUEST, 'merge_type')) {
         case 'family':
             $merge_data = Family::getFamilyDataByMemberIDs($_POST['personid']);
             $dummy = new Family();
             $dummy_family = NULL;
             break;
         case 'person':
         default:
             $merge_data = $GLOBALS['system']->getDBObjectData('person', array('id' => (array) $_POST['personid']));
             $dummy = new Person();
             $dummy_family = new Family();
             break;
     }
     $headerrow = array('ID');
     foreach (array_keys(reset($merge_data)) as $header) {
         if ($header == 'familyid') {
             continue;
         }
         $headerrow[] = strtoupper($dummy->getFieldLabel($header));
     }
     fputcsv($fp, $headerrow);
     foreach ($merge_data as $id => $row) {
         @$dummy->populate($id, $row);
         $outputrow = array($id);
         foreach ($row as $k => $v) {
             if ($k == 'history') {
                 continue;
             }
             if ($k == 'familyid') {
                 continue;
             }
             if ($dummy->hasField($k)) {
                 $outputrow[] = $dummy->getFormattedValue($k, $v);
                 // pass value to work around read-only fields
             } else {
                 if ($dummy_family && $dummy_family->hasField($k)) {
                     $outputrow[] = $dummy_family->getFormattedValue($k, $v);
                 } else {
                     $outputrow[] = $v;
                 }
             }
         }
         fputcsv($fp, $outputrow);
     }
     fclose($fp);
 }
开发者ID:howardgrigg,项目名称:jethro-pmm,代码行数:55,代码来源:call_csv.class.php


示例5: __construct

 /**
  * This is construct base of the class.
  *
  * A public constructor; initializes the variable $instanceDataBase.
  *
  */
 public function __construct($instanceDataBase)
 {
     parent::__construct($instanceDataBase);
     Family::setDataOperationBusiness($instanceDataBase);
     Family::getBusiness();
     Family::getDescriptionBusiness();
 }
开发者ID:vicholuis,项目名称:proyectopruebalms,代码行数:13,代码来源:Family.php


示例6: Results

 public function Results()
 {
     $list = Family::get()->leftJoin('House', '"Family"."ID" = "House"."FamilyID"');
     $status = Convert::raw2sql($this->request->getVar('Status'));
     $holdsRationCard = Convert::raw2sql($this->request->getVar('HoldsRationCard'));
     $cardType = Convert::raw2sql($this->request->getVar('CardType'));
     $houseType = Convert::raw2sql($this->request->getVar('Type'));
     $parishID = Convert::raw2sql($this->request->getVar('ParishID'));
     if ($parishID) {
         $list = $list->filter(array('ParishID' => $parishID));
     }
     if ($status) {
         $list = $list->filter(array('House.Status' => $status));
     }
     if ($holdsRationCard != '') {
         $list = $list->filter(array('House.HoldsRationCard' => $holdsRationCard));
     }
     if ($holdsRationCard && $cardType) {
         $list = $list->filter(array('House.CardType' => $cardType));
     }
     if ($houseType) {
         $list = $list->filter(array('House.Type' => $houseType));
     }
     //$list = $list->leftJoin('Contact', "\"Contact\".\"FamilyID\" = \"Family\".\"ID\"");
     //Debug::show($list);
     return $list;
 }
开发者ID:thomaspaulson,项目名称:myparish,代码行数:27,代码来源:HouseController.php


示例7: readPageXml

 function readPageXml($title)
 {
     $page = null;
     $xml = null;
     $titleString = $title->getText();
     if ($title->getNamespace() == NS_PERSON) {
         $page = new Person($titleString);
     } else {
         $page = new Family($titleString);
     }
     if ($page) {
         $page->loadPage();
         $xml = $page->getPageXml();
     }
     return $xml;
 }
开发者ID:k-hasan-19,项目名称:wiki,代码行数:16,代码来源:AddTreePagesJob.php


示例8: Results

 public function Results()
 {
     $list = Family::get();
     $blockNo = Convert::raw2sql($this->request->getVar('BlockNo'));
     $unitNo = Convert::raw2sql($this->request->getVar('UnitNo'));
     $parishID = Convert::raw2sql($this->request->getVar('ParishID'));
     $pincode = Convert::raw2sql($this->request->getVar('Pincode'));
     $isPanchayat = Convert::raw2sql($this->request->getVar('IsPanchayat'));
     $isMunicipality = Convert::raw2sql($this->request->getVar('IsMunicipality'));
     $isCorporation = Convert::raw2sql($this->request->getVar('IsCorporation'));
     if ($parishID) {
         $list = $list->filter(array('ParishID' => $parishID));
     }
     if ($blockNo) {
         $list = $list->filter(array('BlockNo' => $blockNo));
     }
     if ($unitNo) {
         $list = $list->filter(array('UnitNo' => $unitNo));
     }
     if ($pincode) {
         $list = $list->filter(array('Pincode' => $pincode));
     }
     if ($isPanchayat) {
         $list = $list->filter(array('IsPanchayat' => $isPanchayat));
     }
     if ($isMunicipality) {
         $list = $list->filter(array('IsMunicipality' => $isMunicipality));
     }
     if ($isCorporation) {
         $list = $list->filter(array('IsCorporation' => $isCorporation));
     }
     //$list = $list->leftJoin('Contact', "\"Contact\".\"FamilyID\" = \"Family\".\"ID\"");
     //Debug::show($list);
     return $list;
 }
开发者ID:thomaspaulson,项目名称:myparish,代码行数:35,代码来源:FamilyController.php


示例9: _getFields

 function _getFields()
 {
     $memberFields = array('first_name', 'last_name', 'gender', 'age_bracket', 'congregationid', 'email', 'mobile_tel', 'work_tel', 'familyid', 'family_name', 'address_street', 'address_suburb', 'address_state', 'address_postcode', 'home_tel');
     $p = new Person();
     foreach ($p->_getFields() as $k => $v) {
         if (in_array($k, $memberFields)) {
             $res[$k] = $v;
         }
     }
     $f = new Family();
     foreach ($f->_getFields() as $k => $v) {
         if (in_array($k, $memberFields)) {
             $res[$k] = $v;
         }
     }
     return $res;
 }
开发者ID:samrae,项目名称:jethro-pmm,代码行数:17,代码来源:member.class.php


示例10: ConvertSEO

 public static function ConvertSEO()
 {
     $arrFamilies = Family::model()->findAll();
     foreach ($arrFamilies as $objFamily) {
         $objFamily->request_url = _xls_seo_url($objFamily->family);
         $objFamily->save();
     }
 }
开发者ID:hjlan,项目名称:webstore,代码行数:8,代码来源:Family.php


示例11: loadModel

 private function loadModel($id)
 {
     $model = Family::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
开发者ID:tecshuttle,项目名称:51qsk,代码行数:8,代码来源:FamilyController.php


示例12: actionCreate

 /**
  * 录入
  *
  */
 public function actionCreate()
 {
     parent::_acl();
     $model = new Family();
     $imageList = $this->_gets->getPost('imageList');
     $imageListSerialize = XUtils::imageListSerialize($imageList);
     if (isset($_POST['Family'])) {
         $acl = $this->_gets->getPost('acl');
         $model->attributes = $_POST['Family'];
         $model->actual_people = 0;
         $model->pic_other = $imageListSerialize['dataSerialize'];
         if ($model->save()) {
             AdminLogger::_create(array('catalog' => 'create', 'intro' => '录入内容,ID:' . $model->id));
             $this->redirect(array('index'));
         }
     }
     $this->render('family_create', array('model' => $model, 'imageList' => $imageListSerialize['data']));
 }
开发者ID:tecshuttle,项目名称:51qsk,代码行数:22,代码来源:FamilyController.php


示例13: findFamily

 public static function findFamily($user)
 {
     $families = \Family::all(["user_id = ?" => $user->id], ["member_id", "relation"]);
     $fs = array();
     foreach ($families as $f) {
         $u = \User::first(["id = ?" => $f->member_id], ["name"]);
         $fs[(int) $f->member_id] = ArrayMethods::toObject(["name" => $u->name, "user_id" => $f->member_id, "relation" => $f->relation]);
     }
     return $fs;
 }
开发者ID:HLitmus,项目名称:WebApp,代码行数:10,代码来源:patient.php


示例14: getRecipients

 private function getRecipients()
 {
     $recips = $archived = $blanks = array();
     if (!empty($_REQUEST['queryid'])) {
         $query = $GLOBALS['system']->getDBObject('person_query', (int) $_REQUEST['queryid']);
         $personids = $query->getResultPersonIDs();
         $recips = $GLOBALS['system']->getDBObjectData('person', array('(id' => $personids, '!mobile_tel' => '', '!status' => 'archived'), 'AND');
         $blanks = $GLOBALS['system']->getDBObjectData('person', array('(id' => $personids, 'mobile_tel' => '', '!status' => 'archived'), 'AND');
         $archived = $GLOBALS['system']->getDBObjectData('person', array('(id' => $personids, 'status' => 'archived'), 'AND');
     } else {
         if (!empty($_REQUEST['groupid'])) {
             $group = $GLOBALS['system']->getDBObject('person_group', (int) $_REQUEST['groupid']);
             $personids = array_keys($group->getMembers());
             $recips = $GLOBALS['system']->getDBObjectData('person', array('(id' => $personids, '!mobile_tel' => '', '!status' => 'archived'), 'AND');
             $blanks = $GLOBALS['system']->getDBObjectData('person', array('(id' => $personids, 'mobile_tel' => '', '!status' => 'archived'), 'AND');
             $archived = $GLOBALS['system']->getDBObjectData('person', array('(id' => $personids, 'status' => 'archived'), 'AND');
         } else {
             if (!empty($_REQUEST['roster_view'])) {
                 $view = $GLOBALS['system']->getDBObject('roster_view', (int) $_REQUEST['roster_view']);
                 $recips = $view->getAssignees($_REQUEST['start_date'], $_REQUEST['end_date']);
                 foreach ($recips as $i => $details) {
                     if ($details['status'] == 'archived') {
                         $archived[$i] = $details;
                         unset($recips[$i]);
                     } else {
                         if (empty($details['mobile_tel'])) {
                             $blanks[$i] = $details;
                             unset($recips[$i]);
                         }
                     }
                 }
             } else {
                 switch (array_get($_REQUEST, 'sms_type')) {
                     case 'family':
                         $GLOBALS['system']->includeDBClass('family');
                         $families = Family::getFamilyDataByMemberIDs($_POST['personid']);
                         $recips = $GLOBALS['system']->getDBObjectData('person', array('age_bracket' => '0', '(familyid' => array_keys($families), '!mobile_tel' => '', '!status' => 'archived'), 'AND');
                         $blanks = $GLOBALS['system']->getDBObjectData('person', array('age_bracket' => '0', '(familyid' => array_keys($families), 'mobile_tel' => '', '!status' => 'archived'), 'AND');
                         $archived = $GLOBALS['system']->getDBObjectData('person', array('age_bracket' => '0', '(familyid' => array_keys($families), 'status' => 'archived'), 'AND');
                         break;
                     case 'person':
                     default:
                         if (!empty($_POST['personid'])) {
                             $recips = $GLOBALS['system']->getDBObjectData('person', array('id' => $_POST['personid'], '!mobile_tel' => '', '!status' => 'archived'), 'AND');
                             $blanks = $GLOBALS['system']->getDBObjectData('person', array('id' => $_POST['personid'], 'mobile_tel' => '', '!status' => 'archived'), 'AND');
                             $archived = $GLOBALS['system']->getDBObjectData('person', array('id' => $_POST['personid'], 'status' => 'archived'), 'AND');
                             $GLOBALS['system']->includeDBClass('person');
                         }
                         break;
                 }
             }
         }
     }
     return array($recips, $blanks, $archived);
 }
开发者ID:vanoudt,项目名称:jethro-pmm,代码行数:55,代码来源:view_0_send_sms_http.class.php


示例15: run

 function run()
 {
     // Ref: http://en.wikipedia.org/wiki/VCard
     header('Content-type: text/vcf');
     header('Content-Disposition: attachment; filename="contacts_' . date('Y-m-d_h:i') . '.vcf"');
     $GLOBALS['system']->includeDBClass('person');
     $GLOBALS['system']->includeDBClass('family');
     $merge_data = $GLOBALS['system']->getDBObjectData('person', array('id' => $_REQUEST['personid']));
     $dummy = new Person();
     $family = new Family();
     foreach ($merge_data as $id => $row) {
         $dummy->populate($id, $row);
         $family->setvalue('home_tel', $row['home_tel']);
         echo "BEGIN:VCARD\n";
         echo "VERSION:3.0\n";
         echo "N:" . $row['last_name'] . ";" . $row['first_name'] . ";;;\n";
         echo "FN:" . $row['first_name'] . " " . $row['last_name'] . "\n";
         echo "EMAIL;type=INTERNET;type=HOME:" . $row['email'] . "\n";
         echo "ADR;type=HOME:;;" . $row['address_street'] . ";" . $row['address_suburb'] . ";" . $row['address_state'] . ";" . $row['address_postcode'] . ";\n";
         echo "TEL;type=HOME:" . $family->getFormattedValue('home_tel') . "\n";
         echo "TEL;type=WORK:" . $dummy->getFormattedValue('work_tel') . "\n";
         echo "TEL;type=MOBILE:" . $dummy->getFormattedValue('mobile_tel') . "\n";
         echo "TEL;type=CELL:" . $dummy->getFormattedValue('mobile_tel') . "\n";
         if ($g = $dummy->getValue('Gender')) {
             echo "GENDER:" . strtoupper($g[0]) . "\n";
         }
         echo "CATEGORIES:" . $row['congregation'] . "\n";
         echo "ORG:" . $dummy->getFormattedValue('congregationid') . "\n";
         echo "NOTES:" . $dummy->getFormattedValue('congregationid') . "\n";
         echo "ROLE:" . $dummy->getFormattedValue('status') . "\n";
         echo "TITLE:" . $dummy->getFormattedValue('status') . "\n";
         echo "SOURCE:" . build_url(array('personid' => array($id))) . "\n";
         // where to get vcard from
         echo "URL:" . build_url(array('call' => NULL, 'view' => 'persons', 'personid' => $id)) . "\n";
         // definitive location for full details
         echo "UID:" . build_url(array('call' => NULL, 'view' => 'persons', 'personid' => $id)) . "\n";
         echo "END:VCARD\n\n";
     }
 }
开发者ID:vanoudt,项目名称:jethro-pmm,代码行数:39,代码来源:call_vcf.class.php


示例16: Results

 public function Results()
 {
     $list = Family::get()->leftJoin('Business', '"Family"."ID" = "Business"."FamilyID"');
     $agricultureType = Convert::raw2sql($this->request->getVar('Type'));
     $parishID = Convert::raw2sql($this->request->getVar('ParishID'));
     if ($parishID) {
         $list = $list->filter(array('ParishID' => $parishID));
     }
     if ($agricultureType) {
         $list = $list->filter(array('Business.Type' => $agricultureType));
     }
     //$list = $list->leftJoin('Contact', "\"Contact\".\"FamilyID\" = \"Family\".\"ID\"");
     //Debug::show($list);
     return $list;
 }
开发者ID:thomaspaulson,项目名称:myparish,代码行数:15,代码来源:BusinessController.php


示例17: Results

 public function Results()
 {
     $list = Family::get()->leftJoin('ShiftedFrom', '"Family"."ID" = "ShiftedFrom"."FamilyID"');
     $status = Convert::raw2sql($this->request->getVar('Status'));
     $area = Convert::raw2sql($this->request->getVar('Area'));
     $parishID = Convert::raw2sql($this->request->getVar('ParishID'));
     if ($parishID) {
         $list = $list->filter(array('ParishID' => $parishID));
     }
     if ($status != '') {
         $list = $list->filter(array('ShiftedFrom.Status' => $status));
     }
     //$list = $list->leftJoin('Contact', "\"Contact\".\"FamilyID\" = \"Family\".\"ID\"");
     //Debug::show($list);
     return $list;
 }
开发者ID:thomaspaulson,项目名称:myparish,代码行数:16,代码来源:ShiftedFromController.php


示例18: Results

 public function Results()
 {
     $list = Family::get()->leftJoin('Land', '"Family"."ID" = "Land"."FamilyID"');
     $holdsLand = Convert::raw2sql($this->request->getVar('HoldsLand'));
     $area = Convert::raw2sql($this->request->getVar('Area'));
     $parishID = Convert::raw2sql($this->request->getVar('ParishID'));
     if ($parishID) {
         $list = $list->filter(array('ParishID' => $parishID));
     }
     if ($holdsLand != '') {
         $list = $list->filter(array('Land.HoldsLand' => $holdsLand));
     }
     if ($holdsLand && $area) {
         $list = $list->filter(array('Land.Area' => $area));
     }
     return $list;
 }
开发者ID:thomaspaulson,项目名称:myparish,代码行数:17,代码来源:LandController.php


示例19: updateUserFamily

 /**
  * update the family information of the logged in user
  * @param $familyType
  * @param $familyStatus
  * @return array
  */
 public function updateUserFamily($familyType, $familyStatus)
 {
     $Object = new Family();
     $result = $Object->updateFamilyInformation($familyType, $familyStatus);
     return $result;
 }
开发者ID:haziqAhmed7,项目名称:matrimonialweb,代码行数:12,代码来源:FamilyController.php


示例20: array

echo $form->listBox($model, 'categories', CHtml::listData(Category::model()->findAllByAttributes(array('parent' => null), array('order' => 'label')), 'label', 'label'), array('multiple' => 'multiple', 'class' => 'tall wider', 'onChange' => 'js:FillListValues(this)', 'onMouseDown' => 'js:GetCurrentListValues(this)'));
?>
	        <div class="clearfix"></div><?php 
echo CHtml::link(Yii::t('admin', 'Clear All'), '#', array('class' => 'listboxReset', 'onclick' => 'js:jQuery($("#' . CHtml::activeId($model, 'categories') . '").find("option").prop("selected", false))'));
?>
	        <?php 
echo $form->error($model, 'categories');
?>
        </div>

        <div class="span3">
			<?php 
echo $form->labelEx($model, 'families');
?>
	        <?php 
echo $form->listBox($model, 'families', CHtml::listData(Family::model()->findAll(array('order' => 'family')), 'family', 'family'), array('multiple' => 'multiple', 'class' => 'tall wider', 'onChange' => 'js:FillListValues(this)', 'onMouseDown' => 'js:GetCurrentListValues(this)'));
?>
	        <div class="clearfix"></div><?php 
echo CHtml::link(Yii::t('admin', 'Clear All'), '#', array('class' => 'listboxReset', 'onclick' => 'js:jQuery($("#' . CHtml::activeId($model, 'families') . '").find("option").prop("selected", false))'));
?>
			<?php 
echo $form->error($model, 'families');
?>
        </div>
        <div class="span2">
			<?php 
echo $form->labelEx($model, 'classes');
?>
	        <?php 
echo $form->listBox($model, 'classes', CHtml::listData(Classes::model()->findAll(array('order' => 'class_name')), 'class_name', 'class_name'), array('multiple' => 'multiple', 'class' => 'tall', 'onChange' => 'js:FillListValues(this)', 'onMouseDown' => 'js:GetCurrentListValues(this)'));
?>
开发者ID:uiDeveloper116,项目名称:webstore,代码行数:31,代码来源:_restrictions.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
PHP FannieDB类代码示例发布时间:2022-05-23
下一篇:
PHP FactureFournisseur类代码示例发布时间: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