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

PHP Jaws_ORM类代码示例

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

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



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

示例1: NewTerm

 /**
  * Adds a new term
  *
  * @acess   public
  * @param   string  $term       Term
  * @param   string  $fast_url
  * @param   string  $desc       Term's description
  * @return  mixed   Returns true if term was added or Jaws_Error on error
  */
 function NewTerm($term, $fast_url, $desc)
 {
     $fast_url = empty($fast_url) ? $term : $fast_url;
     $fast_url = $this->GetRealFastUrl($fast_url, 'glossary');
     $now = Jaws_DB::getInstance()->date();
     $params['term'] = $term;
     $params['fast_url'] = $fast_url;
     $params['description'] = $desc;
     $params['createtime'] = $now;
     $params['updatetime'] = $now;
     $glossaryTable = Jaws_ORM::getInstance()->table('glossary');
     $result = $glossaryTable->insert($params)->exec();
     if (Jaws_Error::IsError($result)) {
         $GLOBALS['app']->Session->PushLastResponse(_t('GLOSSARY_ERROR_TERM_NOT_CREATED'), RESPONSE_ERROR);
         return new Jaws_Error(_t('GLOSSARY_ERROR_TERM_NOT_CREATED'));
     }
     $GLOBALS['app']->Session->PushLastResponse(_t('GLOSSARY_TERM_ADDED'), RESPONSE_NOTICE);
     $glossaryTable = Jaws_ORM::getInstance()->table('glossary');
     $row = $glossaryTable->select('id:integer')->where('createtime', $now)->fetchRow();
     if (Jaws_Error::IsError($row)) {
         $GLOBALS['app']->Session->PushLastResponse(_t('GLOSSARY_ERROR_TERM_NOT_CREATED'), RESPONSE_ERROR);
         return new Jaws_Error(_t('GLOSSARY_ERROR_TERM_NOT_CREATED'));
     }
     if (isset($row['id'])) {
         return $row['id'];
     }
     return false;
 }
开发者ID:Dulciane,项目名称:jaws,代码行数:37,代码来源:Term.php


示例2: Upgrade

 /**
  * Upgrades the gadget
  *
  * @access  public
  * @param   string  $old    Current version (in registry)
  * @param   string  $new    New version (in the $gadgetInfo file)
  * @return  mixed   True on success, Jaws_Error otherwise
  */
 function Upgrade($old, $new)
 {
     if (version_compare($old, '2.0.0', '<')) {
         $variables = array();
         $variables['logon_hours'] = str_pad('', 42, 'F');
         $result = $this->installSchema('schema.xml', $variables, '1.0.0.xml');
         if (Jaws_Error::IsError($result)) {
             return $result;
         }
         // update users passwords
         $usersTable = Jaws_ORM::getInstance()->table('users');
         $usersTable->update(array('password' => $usersTable->concat(array('{SSHA1}', 'text'), 'password')))->where($usersTable->length('password'), 32, '>')->exec();
         $usersTable->update(array('password' => $usersTable->concat(array('{MD5}', 'text'), 'password')))->where($usersTable->length('password'), 32)->exec();
         // ACL keys
         $this->gadget->acl->insert('ManageFriends');
         $this->gadget->acl->insert('AccessDashboard');
         $this->gadget->acl->insert('ManageDashboard');
     }
     if (version_compare($old, '2.1.0', '<')) {
         $this->gadget->registry->delete('anon_repetitive_email');
     }
     if (version_compare($old, '2.2.0', '<')) {
         $result = $this->installSchema('schema.xml', '', '2.1.0.xml');
         if (Jaws_Error::IsError($result)) {
             return $result;
         }
     }
     return true;
 }
开发者ID:uda,项目名称:jaws,代码行数:37,代码来源:Installer.php


示例3: GetYearEvents

 /**
  * Fetches number of events per month
  *
  * @access  public
  * @param   int     $user   User ID
  * @return  array   Query result
  */
 function GetYearEvents($user = null, $shared = null, $foreign = null, $year)
 {
     $table = Jaws_ORM::getInstance()->table('ec_events as events');
     $jdate = Jaws_Date::getInstance();
     $eventsByMonth = array();
     for ($m = 1; $m <= 12; $m++) {
         $table->reset();
         $table->select('events.id');
         $table->join('ec_recurrences as recs', 'events.id', 'recs.event');
         $table->join('ec_users', 'events.id', 'ec_users.event');
         if ($user !== null) {
             $table->where('ec_users.user', $user)->and();
         }
         if ($shared === true) {
             $table->where('shared', true)->and();
             $table->where('events.user', $user)->and();
         }
         if ($foreign === true) {
             $table->where('ec_users.owner', $user, '<>')->and();
         }
         $daysInMonth = $jdate->monthDays($year, $m);
         $start = $jdate->ToBaseDate($year, $m, 1);
         $start = $GLOBALS['app']->UserTime2UTC($start['timestamp']);
         $stop = $jdate->ToBaseDate($year, $m, $daysInMonth, 23, 59, 59);
         $stop = $GLOBALS['app']->UserTime2UTC($stop['timestamp']);
         $table->where('recs.start_time', $stop, '<')->and();
         $table->where('recs.stop_time', $start, '>');
         $table->groupBy('events.id');
         $eventsByMonth[$m] = count($table->fetchAll());
     }
     return $eventsByMonth;
 }
开发者ID:juniortux,项目名称:jaws,代码行数:39,代码来源:Calendar.php


示例4: DeleteGroups

 /**
  * Delete many group
  *
  * @access  public
  * @returns array of Address Books or Jaws_Error on error
  */
 function DeleteGroups($groups, $user)
 {
     $agModel = $this->gadget->model->load('AddressBookGroup');
     $agModel->DeleteAddressForGroups($groups, $user);
     $aTable = Jaws_ORM::getInstance()->table('address_group');
     return $aTable->delete()->where('user', (int) $user)->and()->where('id', $groups, 'in')->exec();
 }
开发者ID:Dulciane,项目名称:jaws,代码行数:13,代码来源:Groups.php


示例5: Execute

 /**
  * Returns an array with the results of a tag content
  *
  * @access  public
  * @param   string  $action     Action name
  * @param   array   $references Array of References
  * @return  array   An array of entries that matches a certain pattern
  */
 function Execute($action, $references)
 {
     if (empty($action) || !is_array($references) || empty($references)) {
         return false;
     }
     $table = Jaws_ORM::getInstance()->table('blog');
     $table->select('id:integer', 'fast_url', 'title', 'summary', 'text', 'updatetime');
     $result = $table->where('id', $references, 'in')->fetchAll();
     if (Jaws_Error::IsError($result)) {
         return array();
     }
     $date = Jaws_Date::getInstance();
     $posts = array();
     foreach ($result as $r) {
         $post = array();
         $post['title'] = $r['title'];
         $post['url'] = $this->gadget->urlMap('SingleView', array('id' => $r['fast_url']));
         $post['outer'] = false;
         $post['image'] = 'gadgets/Blog/Resources/images/logo.png';
         $post['snippet'] = $r['summary'];
         $post['date'] = $date->ToISO($r['updatetime']);
         $posts[$r['id']] = $post;
     }
     return $posts;
 }
开发者ID:Dulciane,项目名称:jaws,代码行数:33,代码来源:Tags.php


示例6: InsertContact

 /**
  * Sends email to user
  *
  * @access  public
  * @param   string  $name       Name
  * @param   string  $email      Email address
  * @param   string  $company
  * @param   string  $url
  * @param   string  $tel
  * @param   string  $fax
  * @param   string  $mobile
  * @param   string  $address
  * @param   string  $rcipient   Rcipient ID
  * @param   string  $subject    Subject of message
  * @param   string  $attachment Attachment filename
  * @param   string  $message    Message content
  * @return  bool    True on Success or False on Failure
  */
 function InsertContact($name, $email, $company, $url, $tel, $fax, $mobile, $address, $recipient, $subject, $attachment, $message)
 {
     $now = Jaws_DB::getInstance()->date();
     $data = array();
     $data['[user]'] = $GLOBALS['app']->Session->GetAttribute('user');
     $data['ip'] = $_SERVER['REMOTE_ADDR'];
     $data['name'] = $name;
     $data['email'] = $email;
     $data['company'] = $company;
     $data['url'] = $url;
     $data['tel'] = $tel;
     $data['fax'] = $fax;
     $data['mobile'] = $mobile;
     $data['address'] = $address;
     $data['recipient'] = (int) $recipient;
     $data['subject'] = $subject;
     $data['attachment'] = $attachment;
     $data['msg_txt'] = $message;
     $data['reply'] = '';
     $data['reply_sent'] = 0;
     $data['createtime'] = $now;
     $data['updatetime'] = $now;
     $cntctTable = Jaws_ORM::getInstance()->table('contacts');
     $result = $cntctTable->insert($data)->exec();
     if (Jaws_Error::IsError($result)) {
         return false;
     }
     $GLOBALS['app']->Session->SetCookie('visitor_name', $name, 60 * 24 * 150);
     $GLOBALS['app']->Session->SetCookie('visitor_email', $email, 60 * 24 * 150);
     $GLOBALS['app']->Session->SetCookie('visitor_url', $url, 60 * 24 * 150);
     return $result;
 }
开发者ID:juniortux,项目名称:jaws,代码行数:50,代码来源:Contacts.php


示例7: Execute

 /**
  * Fetches files having specific tag
  *
  * @access  public
  * @param   string  $action     Action name
  * @param   array   $references Array of References
  * @return  array   An array of entries that matches a certain pattern
  */
 function Execute($action, $references)
 {
     if (empty($action) || !is_array($references) || empty($references)) {
         return false;
     }
     $table = Jaws_ORM::getInstance()->table('directory');
     $table->select('id:integer', 'title', 'description', 'update_time');
     $result = $table->where('hidden', false)->and()->where('id', $references, 'in')->fetchAll();
     if (Jaws_Error::IsError($result)) {
         return array();
     }
     $date = Jaws_Date::getInstance();
     $files = array();
     foreach ($result as $r) {
         $file = array();
         $file['title'] = $r['title'];
         $file['url'] = $this->gadget->urlMap('Directory', array('id' => $r['id']));
         $file['outer'] = false;
         $file['image'] = 'gadgets/Directory/Resources/images/logo.png';
         $file['snippet'] = $r['description'];
         $file['date'] = $date->ToISO($r['update_time']);
         $files[$r['id']] = $file;
     }
     return $files;
 }
开发者ID:uda,项目名称:jaws,代码行数:33,代码来源:Tags.php


示例8: GetMoblog

 /**
  * Get entries as Moblog
  *
  * @access  public
  * @return  mixed   Returns an array of phoo entries in moblog format and Jaws_Error on error
  */
 function GetMoblog($album)
 {
     $table = Jaws_ORM::getInstance()->table('phoo_image_album');
     $table->select('phoo_album_id', 'filename', 'phoo_image.id', 'phoo_image.title', 'phoo_image.description', 'phoo_image.createtime');
     $table->join('phoo_image', 'phoo_image.id', 'phoo_image_album.phoo_image_id');
     $table->join('phoo_album', 'phoo_album.id', 'phoo_image_album.phoo_album_id');
     $table->where('phoo_image.published', true)->and();
     $table->where('phoo_album.id', $album);
     $table->orderBy('phoo_image.createtime desc');
     $limit = $this->gadget->registry->fetch('moblog_limit');
     if (Jaws_Error::isError($limit)) {
         return new Jaws_Error(_t('PHOO_ERROR_GETMOBLOG'));
     }
     $result = $table->limit($limit)->fetchAll();
     if (Jaws_Error::IsError($result)) {
         return new Jaws_Error(_t('PHOO_ERROR_GETMOBLOG'));
     }
     foreach ($result as $key => $image) {
         $result[$key]['name'] = $image['title'];
         $result[$key]['thumb'] = $this->GetThumbPath($image['filename']);
         $result[$key]['medium'] = $this->GetMediumPath($image['filename']);
         $result[$key]['image'] = $this->GetOriginalPath($image['filename']);
         $result[$key]['stripped_description'] = $image['description'];
     }
     return $result;
 }
开发者ID:Dulciane,项目名称:jaws,代码行数:32,代码来源:Moblog.php


示例9: GetNumberOfEvents

 /**
  * Fetches number of total events
  *
  * @access  public
  * @param   int     $user   User ID
  * @return  array   Query result
  */
 function GetNumberOfEvents($user = null, $query = null, $shared = null, $foreign = null, $start = null, $stop = null)
 {
     $table = Jaws_ORM::getInstance()->table('ec_events as event');
     $table->select('count(event.id)');
     $table->join('ec_users', 'event.id', 'event');
     $table->join('users', 'owner', 'users.id');
     if ($user !== null) {
         $table->where('ec_users.user', $user)->and();
     }
     if ($shared === true) {
         $table->where('shared', true)->and();
         $table->where('event.user', $user)->and();
     }
     if ($foreign === true) {
         $table->where('ec_users.owner', $user, '<>')->and();
     }
     if ($query !== null) {
         $query = "%{$query}%";
         $table->openWhere('subject', $query, 'like')->or();
         $table->where('location', $query, 'like')->or();
         $table->closeWhere('description', $query, 'like')->and();
     }
     $jdate = Jaws_Date::getInstance();
     if (!empty($start)) {
         $start = $jdate->ToBaseDate(preg_split('/[- :]/', $start), 'Y-m-d');
         $start = $GLOBALS['app']->UserTime2UTC($start);
         $table->where('stop_time', $start, '>')->and();
     }
     if (!empty($stop)) {
         $stop = $jdate->ToBaseDate(preg_split('/[- :]/', $stop), 'Y-m-d');
         $stop = $GLOBALS['app']->UserTime2UTC($stop);
         $table->where('start_time', $stop, '<');
     }
     return $table->fetchOne();
 }
开发者ID:Dulciane,项目名称:jaws,代码行数:42,代码来源:Events.php


示例10: Execute

 /**
  * Returns an array with the results of a tag content
  *
  * @access  public
  * @param   string  $action     Action name
  * @param   array   $references Array of References
  * @return  array   An array of entries that matches a certain pattern
  */
 function Execute($action, $references)
 {
     if (empty($action) || !is_array($references) || empty($references)) {
         return false;
     }
     $sptTable = Jaws_ORM::getInstance()->table('static_pages_translation');
     $sptTable->select('page_id:integer', 'group_id', 'title', 'content', 'language', 'fast_url', 'static_pages_translation.updated');
     $sptTable->join('static_pages', 'static_pages.page_id', 'static_pages_translation.base_id');
     $result = $sptTable->where('translation_id', $references, 'in')->fetchAll();
     if (Jaws_Error::IsError($result)) {
         return array();
     }
     $date = Jaws_Date::getInstance();
     $pages = array();
     foreach ($result as $p) {
         if (!$this->gadget->GetPermission('AccessGroup', $p['group_id'])) {
             continue;
         }
         $page = array();
         $page['title'] = $p['title'];
         $url = $this->gadget->urlMap('Page', array('pid' => empty($p['fast_url']) ? $p['page_id'] : $p['fast_url'], 'language' => $p['language']));
         $page['url'] = $url;
         $page['image'] = 'gadgets/StaticPage/Resources/images/logo.png';
         $page['snippet'] = $p['content'];
         $page['date'] = $date->ToISO($p['updated']);
         $pages[$p['page_id']] = $page;
     }
     return $pages;
 }
开发者ID:Dulciane,项目名称:jaws,代码行数:37,代码来源:Tags.php


示例11: Execute

 /**
  * Returns an array with the results of a tag content
  *
  * @access  public
  * @param   string  $action     Action name
  * @param   array   $references Array of References
  * @return  array   An array of entries that matches a certain pattern
  */
 function Execute($action, $references)
 {
     if (empty($action) || !is_array($references) || empty($references)) {
         return false;
     }
     $table = Jaws_ORM::getInstance()->table('linkdump_links');
     $table->select('id:integer', 'title', 'description', 'updatetime');
     $result = $table->where('id', $references, 'in')->fetchAll();
     if (Jaws_Error::IsError($result)) {
         return array();
     }
     $date = Jaws_Date::getInstance();
     $links = array();
     foreach ($result as $r) {
         $link = array();
         $link['title'] = $r['title'];
         $link['url'] = $this->gadget->urlMap('Link', array('id' => $r['id']));
         $link['outer'] = true;
         $link['image'] = 'gadgets/LinkDump/Resources/images/logo.png';
         $link['snippet'] = $r['description'];
         $link['date'] = $date->ToISO($r['updatetime']);
         $links[$r['id']] = $link;
     }
     return $links;
 }
开发者ID:Dulciane,项目名称:jaws,代码行数:33,代码来源:Tags.php


示例12: UpdateEventUsers

 /**
  * Updates users of a event
  *
  * @access  public
  * @param   int     $id     Event ID
  * @param   array   $users  Set of User IDs
  * @return  mixed   True or Jaws_Error
  */
 function UpdateEventUsers($id, $users)
 {
     // Update shared status of the event
     $shared = !empty($users);
     $table = Jaws_ORM::getInstance()->table('ec_events');
     $table->beginTransaction();
     $table->update(array('shared' => $shared));
     $res = $table->where('id', $id)->exec();
     if (Jaws_Error::IsError($res)) {
         return $res;
     }
     // Delete current users except owner
     $uid = (int) $GLOBALS['app']->Session->GetAttribute('user');
     $table = Jaws_ORM::getInstance()->table('ec_users');
     $table->delete()->where('event', $id)->and();
     $res = $table->where('user', $uid, '<>')->exec();
     if (Jaws_Error::IsError($res)) {
         return $res;
     }
     // Insert users
     if (!empty($users)) {
         foreach ($users as &$user) {
             $user = array('event' => $id, 'user' => $user, 'owner' => $uid);
         }
         $table = Jaws_ORM::getInstance()->table('ec_users');
         $table->reset();
         $table->insertAll(array('event', 'user', 'owner'), $users);
         $res = $table->exec();
         if (Jaws_Error::IsError($res)) {
             return $res;
         }
     }
     $table->commit();
 }
开发者ID:Dulciane,项目名称:jaws,代码行数:42,代码来源:Share.php


示例13: GetAlbumGroupsInfo

 /**
  * Get AlbumGroup list with group information
  *
  * @access  public
  * @param   int      $album         Album ID
  * @return  mixed    array with the groups or Jaws_Error on error
  */
 function GetAlbumGroupsInfo($album)
 {
     $table = Jaws_ORM::getInstance()->table('phoo_album_group');
     $table->select('phoo_album_group.group', 'phoo_group.name', 'phoo_group.fast_url');
     $table->join('phoo_group', 'phoo_album_group.group', 'phoo_group.id');
     $table->where('album', $album);
     return $table->fetchAll();
 }
开发者ID:juniortux,项目名称:jaws,代码行数:15,代码来源:AlbumGroup.php


示例14: UpdateFileUsers

 /**
  * Creates shortcuts of the file for passed users
  *
  * @access  public
  * @param   int     $id     File ID
  * @param   array   $users  Users ID's
  * @return  mixed   True or Jaws_Error
  */
 function UpdateFileUsers($id, $users)
 {
     $table = Jaws_ORM::getInstance()->table('directory');
     // Fetch file info
     $table->select('is_dir:boolean', 'title', 'description', 'filename', 'filetype', 'filesize', 'url', 'updatetime', 'user', 'owner', 'reference', 'shared:boolean');
     $file = $table->where('id', $id)->fetchRow();
     if (Jaws_Error::IsError($file)) {
         return $file;
     }
     // Fetch file users
     $table->reset();
     $table->select('user');
     $table->where('reference', $id);
     $current_users = $table->fetchColumn();
     if (Jaws_Error::IsError($current_users)) {
         return $current_users;
     }
     $old_ids = array_diff($current_users, $users);
     $new_ids = array_diff($users, $current_users);
     // Delete old shortcuts
     if (!empty($old_ids)) {
         $table->reset();
         $table->delete();
         $table->where('reference', $id)->and();
         $table->where('user', $old_ids, 'in');
         $res = $table->exec();
         if (Jaws_Error::IsError($res)) {
             return $res;
         }
     }
     // Create new shortcuts
     if (!empty($new_ids)) {
         $shortcut = $file;
         $shortcut['parent'] = 0;
         $shortcut['shared'] = false;
         $shortcut['reference'] = !empty($file['reference']) ? $file['reference'] : $id;
         $shortcut['createtime'] = time();
         foreach ($new_ids as $uid) {
             $shortcut['user'] = $uid;
             $table->reset();
             $res = $table->insert($shortcut)->exec();
             if (Jaws_Error::IsError($res)) {
                 return $res;
             }
         }
     }
     // Update `shared` status
     $shared = !empty($users);
     if ($file['shared'] !== $shared) {
         $table->reset();
         $table->update(array('shared' => $shared));
         $res = $table->where('id', $id)->exec();
         if (Jaws_Error::IsError($res)) {
             return $res;
         }
     }
     return true;
 }
开发者ID:juniortux,项目名称:jaws,代码行数:66,代码来源:Share.php


示例15: GetTerms

 /**
  * Get a list of all the terms
  *
  * @access  public
  * @return  mixed   Returns an array with all the terms or Jaws_Error on error
  */
 function GetTerms()
 {
     $glossaryTable = Jaws_ORM::getInstance()->table('glossary');
     $result = $glossaryTable->select('id:integer', 'user_id:integer', 'term', 'fast_url', 'description', 'updatetime')->orderBy('term')->fetchAll();
     if (Jaws_Error::IsError($result)) {
         return new Jaws_Error($result->getMessage());
     }
     return $result;
 }
开发者ID:juniortux,项目名称:jaws,代码行数:15,代码来源:Term.php


示例16: DeleteLayout

 /**
  * Delete a layout
  *
  * @access  public
  * @param   string  $layout Layout name
  * @param   int     $user   (Optional)User's ID
  * @return  bool    Returns true if layout was removed otherwise it returns Jaws_Error
  */
 function DeleteLayout($layout, $user = 0)
 {
     $lyTable = Jaws_ORM::getInstance()->table('layout');
     $lyTable->delete()->where('layout', $layout);
     if (!empty($user)) {
         $lyTable->and()->where('user', (int) $user);
     }
     return $lyTable->exec();
 }
开发者ID:uda,项目名称:jaws,代码行数:17,代码来源:Sections.php


示例17: DeleteGadgetComments

 /**
  * Deletes all comments of a certain gadget/reference
  *
  * @access  public
  * @param   string  $gadget     Gadget name
  * @param   int     $reference  Gadget reference id
  * @return  mixed   True on success and Jaws_Error on failure
  */
 function DeleteGadgetComments($gadget, $reference = '')
 {
     $commentTable = Jaws_ORM::getInstance()->table('comments');
     $commentTable->delete()->where('gadget', $gadget);
     if (!empty($reference)) {
         $commentTable->and()->where('reference', (int) $reference);
     }
     return $commentTable->exec();
 }
开发者ID:Dulciane,项目名称:jaws,代码行数:17,代码来源:DeleteComments.php


示例18: GetAliasPath

 /**
  * Returns the real path of an alias(given path), if no alias is found
  * it returns false
  *
  * @access  public
  * @param   string  $alias  Alias
  * @return  mixed   Real path(URL) or false
  */
 function GetAliasPath($alias)
 {
     $aliasesTable = Jaws_ORM::getInstance()->table('url_aliases');
     $result = $aliasesTable->select('real_url')->where('alias_hash', md5($alias))->fetchOne();
     if (Jaws_Error::IsError($result) || empty($result)) {
         return false;
     }
     return $result;
 }
开发者ID:juniortux,项目名称:jaws,代码行数:17,代码来源:Aliases.php


示例19: ErrorMapExists

 /**
  * Checks if hash already exists or not
  *
  * @access   public
  * @param    string  $url_hash   URL HASH value
  * @return   bool   Exists/Doesn't exists
  */
 function ErrorMapExists($url_hash)
 {
     $urlerrorsTable = Jaws_ORM::getInstance()->table('url_errors');
     $result = $urlerrorsTable->select('count([id]):integer')->where('url_hash', $url_hash)->fetchOne();
     if (Jaws_Error::IsError($result)) {
         return $result;
     }
     return $result == '0' ? false : true;
 }
开发者ID:Dulciane,项目名称:jaws,代码行数:16,代码来源:ErrorMaps.php


示例20: DeleteUserLayouts

 /**
  * Delete user's layouts
  *
  * @access  public
  * @param   int     $user   User's ID
  * @param   bool    $index  Index layout
  * @return  bool    Returns true if layouts was removed otherwise it returns Jaws_Error
  */
 function DeleteUserLayouts($user, $index = null)
 {
     $lyTable = Jaws_ORM::getInstance()->table('layout');
     $lyTable->delete()->where('user', (int) $user);
     if (!is_null($index)) {
         $lyTable->and()->where('index', (bool) $index);
     }
     return $lyTable->exec();
 }
开发者ID:juniortux,项目名称:jaws,代码行数:17,代码来源:Sections.php



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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