当前位置: 首页>>代码示例>>PHP>>正文


PHP aa函数代码示例

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


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

示例1: destroy

 function destroy()
 {
     #    @issue_count = @category.issues.size
     #    if @issue_count == 0
     #      # No issue assigned to this category
     #      @category.destroy
     #      redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'categories'
     #    elsif params[:todo]
     #      reassign_to = @project.issue_categories.find_by_id(params[:reassign_to_id]) if params[:todo] == 'reassign'
     #      @category.destroy(reassign_to)
     #      redirect_to :controller => 'projects', :action => 'settings', :id => @project, :tab => 'categories'
     #    end
     App::import('model', 'Issue');
     $Issue = new Issue();
     $issue_count = $Issue->find('count', aa('conditions', aa('category_id', $this->params['id'])));
     if ($issue_count == 0) {
         $this->IssueCategory->del($this->params['id']);
         $this->redirect(aa('controller', 'projects', 'action', 'settings', 'project_id', $this->_project['Project']['identifier'], '?', 'tab=categories'));
     } elseif ($this->data) {
         $reassgin_to = null;
         if ($this->data['IssueCategory']['todo'] == 'reassgin_to') {
             $reassgin_to = $this->data['IssueCategory']['reassign_to_id'];
         }
         $this->IssueCategory->del_with_reassgin($this->params['id'], $reassgin_to);
         $this->redirect(aa('controller', 'projects', 'action', 'settings', 'project_id', $this->_project['Project']['identifier'], '?', 'tab=categories'));
     }
     $issue_category_data = $this->IssueCategory->find('first', aa('conditions', aa('IssueCategory.id', $this->params['id'])));
     $this->set('issue_category_data', $issue_category_data);
     $this->set('issue_count', $issue_count);
 }
开发者ID:predominant,项目名称:candycane,代码行数:30,代码来源:issue_categories_controller.php

示例2: destroy

 function destroy()
 {
     if ($this->data && isset($this->data['Wiki']['confirm'])) {
         $this->Project->Wiki->del($this->_project['Wiki']['id']);
         $this->redirect(aa('controller', 'projects', 'action', 'settings', 'id', $this->params['project_id'], '?', 'tab=wiki'));
     }
 }
开发者ID:predominant,项目名称:candycane,代码行数:7,代码来源:wikis_controller.php

示例3: destroy

 function destroy($row, $reassign_to = null)
 {
     #    if reassign_to && reassign_to.is_a?(Enumeration)
     $model = ClassRegistry::init($this->OPTIONS[$row['Enumeration']['opt']]['model']);
     $model->updateAll(aa($this->OPTIONS[$row['Enumeration']['opt']]['foreign_key'], $reassign_to), aa($this->OPTIONS[$row['Enumeration']['opt']]['foreign_key'], $row['Enumeration']['id']));
     #    end
     $this->del($row['Enumeration']['id']);
 }
开发者ID:predominant,项目名称:candycane,代码行数:8,代码来源:enumeration.php

示例4: _prepareSettingTabMembers

 function _prepareSettingTabMembers()
 {
     $members = $this->Member->find('all', aa('conditions', aa('project_id', $this->_project['Project']['id']), 'order', 'Role.position'));
     $this->set('members', $members);
     $roles = $this->Member->Role->find_all_givable();
     $this->set('roles_data', $roles);
     $users = $this->Member->User->find('all', aa('conditions', aa('status', USER_STATUS_ACTIVE), 'recursive', -1));
     $this->set('users_data', $users);
 }
开发者ID:predominant,项目名称:candycane,代码行数:9,代码来源:members_controller.php

示例5: defaults

 function defaults($model)
 {
     $results = aa($model->name, a());
     foreach ($model->_schema as $k => $v) {
         $results[$model->name][$k] = $v['default'];
     }
     $results = $model->afterFind(array($results), true);
     return $results[0][$model->name];
 }
开发者ID:nachtschatt3n,项目名称:candycane,代码行数:9,代码来源:candy.php

示例6: show

 function show()
 {
     #  def show
     #    @comments = @news.comments
     #    @comments.reverse! if User.current.wants_comments_in_reverse_order?
     #  end
     //$this->data = $this->News->read(null, $this->params['news_id']);
     $this->data = $this->News->find('first', aa('conditions', aa('News.id', $this->params['id']), 'recursive', 3));
     $this->set('news', $this->data);
 }
开发者ID:hiromi2424,项目名称:candycane,代码行数:10,代码来源:news_controller.php

示例7: _prepareSettingTabs

 function _prepareSettingTabs()
 {
     $tabs = array(aa('name', 'general', 'partial', 'settings/general', 'label', __('General', true)), aa('name', 'authentication', 'partial', 'settings/authentication', 'label', __('Authentication', true)), aa('name', 'projects', 'partial', 'settings/projects', 'label', __('Projects', true)), aa('name', 'issues', 'partial', 'settings/issues', 'label', __('Issue tracking', true)), aa('name', 'notifications', 'partial', 'settings/notifications', 'label', __('Email notifications', true)));
     $this->set('settings_tabs', $tabs);
     $selected_tab = $tabs[0]['name'];
     if (isset($this->params['url']['tab'])) {
         $selected_tab = $this->params['url']['tab'];
     }
     $this->set('selected_tab', $selected_tab);
 }
开发者ID:predominant,项目名称:candycane,代码行数:10,代码来源:settings_controller.php

示例8: index

 function index()
 {
     $post_data = $this->paginate('Post');
     $param = array('fields' => a('count(*)'), 'conditions' => aa('Post.user_id', 1));
     $my_count = $this->Post->find('all', $param);
     $param = array('fields' => a('count(*)'));
     $all_count = $this->Post->find('all', $param);
     $this->set('my_count', $my_count[0][0]['count(*)']);
     $this->set('all_count', $all_count[0][0]['count(*)']);
     $this->set('post_data', $post_data);
     $this->render('index');
 }
开发者ID:kaz29,项目名称:matsutter,代码行数:12,代码来源:posts_controller.php

示例9: _detectProjectId

 function _detectProjectId()
 {
     $project_id = null;
     if (isset($this->controller->params['project_id'])) {
         $project_id = $this->controller->params['project_id'];
     }
     if ($this->controller->name == 'Versions') {
         $version_id = $this->controller->params['pass'][0];
         App::import('model', 'Version');
         $version = new Version();
         $bind = array('belongsTo' => array('Project' => array('className' => 'Project')));
         $version->bindModel($bind);
         $version_row = $version->find('first', aa('condtions', aa('id', $version_id)));
         $project_id = $version_row['Project']['identifier'];
     }
     return $project_id;
 }
开发者ID:predominant,项目名称:candycane,代码行数:17,代码来源:menu_manager.php

示例10: find_page

 function find_page($title, $options = array())
 {
     $param = array();
     if ($title === "") {
         $title = $this->field('start_page');
     }
     $title = Wiki::titleize($title);
     $page = $this->WikiPage->find('first', aa('conditions', aa('WikiPage.wiki_id', $this->id, 'WikiPage.title', $title)));
     if (isset($page['WikiPage']['id'])) {
         $this->WikiPage->id = $page['WikiPage']['id'];
     }
     //    if !page && !(options[:with_redirect] == false)
     //      # search for a redirect
     //      redirect = redirects.find_by_title(title)
     //      page = find_page(redirect.redirects_to, :with_redirect => false) if redirect
     //    end
     return $page;
 }
开发者ID:nachtschatt3n,项目名称:candycane,代码行数:18,代码来源:wiki.php

示例11: __debug

 function __debug()
 {
     $argc = func_num_args();
     $args = func_get_args();
     if ($argc == 0) {
         return false;
     }
     global $__session;
     if (Configure::read() == 0) {
         return false;
     }
     $class = 'CakeSession';
     if ($__session === null) {
         if (ClassRegistry::isKeySet($class)) {
             $__session =& ClassRegistry::getObject($class);
         } else {
             if (!class_exists($class)) {
                 App::import('Core', $class);
             }
             $__session =& new $class();
             ClassRegistry::addObject($class, $__session);
         }
     }
     $session =& $__session;
     if (!$session->started()) {
         $session->start();
     }
     $debugs = array();
     if ($session->check('debug.printable')) {
         $debugs = $session->read('debug.printable');
     }
     $debugger =& Debugger::getInstance();
     $trace = $debugger->trace(aa('start', 2, 'format', 'array'));
     while ($trace[0]['function'] === __FUNCTION__ || false !== strpos($trace[0]['function'], 'call_user_func')) {
         array_shift($trace);
     }
     $debug = compact('args', 'trace');
     $debugs = array_merge($debugs, array($debug));
     // debug(compact('prints','args'));
     $session->write('debug.printable', $debugs);
     return true;
 }
开发者ID:hiromi2424,项目名称:cake_base,代码行数:42,代码来源:bootstrap.php

示例12: show

 function show($id)
 {
     $this->Version->id = $id;
     $this->data = $this->Version->read();
     $issues = $this->Version->FixedIssue->find('all', aa('conditions', aa('fixed_version_id', $id)));
     foreach ($issues as $key => $issue) {
         $issues[$key]['Issue'] = $issue['FixedIssue'];
     }
     $this->set('issues', $issues);
     // @FIXME
     $fixed_issue_count = count($issues);
     $this->set('fixed_issue_count', $fixed_issue_count);
     $wiki_content = $this->Wiki->WikiPage->find('first', aa('conditions', aa('WikiPage.title', $this->data['Version']['wiki_page_title'])));
     $this->set('wiki_content', $wiki_content);
     /*
     <% issues = @version.fixed_issues.find(:all,
                                       :include => [:status, :tracker],
                                       :order => "#{Tracker.table_name}.position, #{Issue.table_name}.id") %>
     */
 }
开发者ID:predominant,项目名称:candycane,代码行数:20,代码来源:versions_controller.php

示例13: abc

<?php

function abc()
{
    return md();
}
function aa()
{
    return 1;
}
//더 쓸모 없는 주석
echo "===> " . abc() . aa();
开发者ID:nhchoi,项目名称:toy,代码行数:12,代码来源:a.php

示例14: testAa

 /**
  * Constructs associative array from pairs of arguments.
  */
 public function testAa()
 {
     $result = aa('a', 'b', 'c');
     $expect = array('a' => 'b', 'c' => null);
     $this->assertEquals($expect, $result);
 }
开发者ID:baserproject,项目名称:basercms,代码行数:9,代码来源:BcBasicsTest.php

示例15: del_with_reassgin

 function del_with_reassgin($id, $reassgin_to = null)
 {
     $this->bindModel(array('hasMany' => array('Issue' => array('foreignKey' => 'category_id'))));
     $this->Issue->updateAll(aa('category_id', $reassgin_to), aa('category_id', $id));
     $this->del($id);
 }
开发者ID:predominant,项目名称:candycane,代码行数:6,代码来源:issue_category.php


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