本文整理汇总了PHP中UserDAO::get方法的典型用法代码示例。如果您正苦于以下问题:PHP UserDAO::get方法的具体用法?PHP UserDAO::get怎么用?PHP UserDAO::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类UserDAO
的用法示例。
在下文中一共展示了UserDAO::get方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: delete
public function delete($name, $owner)
{
try {
// DELETE the file from DynamoDB, table 'Contents'
$this->client->deleteItem(array('TableName' => ContentDAO::$TABLE_NAME, 'Key' => array('name' => array('S' => $name), 'owner' => array('S' => $owner))));
// GET the owner's type of the file
$userDao = new UserDAO($this->client);
$user = $userDao->get($owner);
$type = $user->getType();
// GET the children of the owner
$childDao = new ChildDAO($this->client);
$children = $childDao->getChildren($owner);
// DELETE the file from children arrays
$length = count($children);
for ($i = 0; $i < $length; $i++) {
$child = $children[$i];
$child->deleteContent($name, $owner, $type);
$childDao->update($child);
}
} catch (Exception $e) {
echo '<p>Exception reçue : ', $e->getMessage(), "\n</p>";
}
}
示例2: actionProfile
/**
* Show a users profile
* @param <type> $userid
*/
public function actionProfile($userid)
{
// TODO Add possibility to view by username
$this->_assert($userid);
$dao = UserDAO::get('User');
$user = $dao->findById($userid);
$this->_assert($user);
// prepare the view
$this->addView('user/profile', 'content');
$this->pagetitle = 'User Profile';
$this->content->user = $user;
}
示例3: _toTimeline
private static function _toTimeline(Timeline $timelineDb)
{
return new TimelineModel($timelineDb->getId(), $timelineDb->getName(), UserDAO::get($timelineDb->getId()));
}
示例4: UserDAO
echo "<div style='margin-bottom: 30px;'>" . $translArray[3] . ": <textarea name='contenueTexte" . ($ligne + 1 + 1) . "' id='ameliorer' rows='2' cols='100' style='margin-left: 40px;margin-bottom: -31px;'>" . $translArray[$ligne + 1 + 4] . "</textarea></div><br/>";
/* echo '<div class="dropdown">
<button class="btn btn-primary dropdown-toggle" type="button" data-toggle="dropdown">Dropdown Example
<span class="caret"></span></button>
<ul class="dropdown-menu">
<li><a href="#">HTML</a></li>
<li><a href="#">CSS</a></li>
<li><a href="#">JavaScript</a></li>
</ul>
</div>';
*
*
*/
$userDao = new UserDAO(DynamoDbClientBuilder::get());
$email = "admin_off";
$user = $userDao->get($email);
$contentDaoD = new ContentDAO(DynamoDbClientBuilder::get());
$contents = $contentDaoD->getContentsOfUser($email);
//print_r($contents);
// echo "<div>".$translArray[4]. ": <textarea name='contenueTexte".($ligne+1+2)."' id='ameliorer' rows='1' cols='100' style='margin-left: 38px;'>".$translArray[$ligne+2+4]."</textarea></div><br/>";
echo '<div class="dropdown">
<input type="hidden" name="Slide[]" class="Slide">
' . $translArray[4] . ' :
<button class="btn btn-warning dropdown-toggle " type="button" data-toggle="dropdown" style="margin-left: 40px;">' . $translArray[$ligne + 2 + 4] . '
<span class="caret"></span></button>
<ul class="dropdown-menu">';
foreach ($contents as $c) {
echo '<li ><a href="#" name="' . $c->getName() . '">' . $c->getName() . ' </a></li>';
}
echo ' </ul>
</div><br/>';
示例5: DaysOfYear
<?php
include $root . 'nav.php';
?>
<?php
$doy = new DaysOfYear();
$year = date('Y');
$calendar = $doy->getAll($year);
$access_rights = Rights::$NONE;
$child_email = $_GET['email'];
$adult_email = $_SESSION['email'];
if (!empty($child_email) && !empty($adult_email)) {
$childDao = new ChildDAO(DynamoDbClientBuilder::get());
$child = $childDao->get($child_email);
$usrDao = new UserDAO(DynamoDbClientBuilder::get());
$user = $usrDao->get($adult_email);
if ($child->isFather($user->getEmail())) {
$access_rights = Rights::$FULL_ACCESS;
// pour l'instant en dur, plus tard dans la base
}
echo '<span class="email" email="' . $child_email . '"></span>';
echo '<span class="adultEmail" email="' . $adult_email . '" type="' . $user->getType() . '"></span>';
}
?>
<div class ='periods'>