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


PHP fCore::expose方法代码示例

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


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

示例1: acknowledgeCheck

        static public function acknowledgeCheck($check=NULL,$result=NULL,$ackAll=false)
	{
	  if (!is_null($check)) {
            if ($ackAll === true) {
    	      $check_results = CheckResult::findAll($check->getCheckId());
            } elseif (!is_null($result)) {
              $check_results = CheckResult::build($result->getResultId());
            }
	    foreach ($check_results as $check_result) {
            fCore::expose($check_result);
             $check_result->setAcknowledged(1);
             $check_result->store();
	    }
	  }
        }       
开发者ID:rberger,项目名称:Graphite-Tattle,代码行数:15,代码来源:Check.php

示例2: testExposeMultiple

 public function testExposeMultiple()
 {
     ob_start();
     fCore::expose('string', TRUE);
     $output = ob_get_clean();
     $this->assertEquals("Array\n(\n    [0] => string\n    [1] => {true}\n)\n", $output);
 }
开发者ID:nurulimamnotes,项目名称:flourish-old,代码行数:7,代码来源:fCoreTest.php

示例3: testListGet

 /**
  * @dataProvider serverProvider
  */
 public function testListGet($type, $host, $port, $secure, $username, $password)
 {
     $mailbox = new fMailbox($type, $host, $username, $password, $port, $secure, 5);
     fMailbox::addSMIMEPair('tests@flourishlib.com', './email/tests@flourishlib.com.crt', './email/tests@flourishlib.com.key', EMAIL_PASSWORD);
     $messages = array();
     foreach ($mailbox->listMessages() as $uid => $overview) {
         $info = $mailbox->fetchMessage($uid);
         if (!isset($info['headers'])) {
             fCore::expose($info);
         }
         $messages[$info['headers']['message-id']] = array('subject' => $info['headers']['subject'], 'from' => $info['headers']['from']['mailbox'] . '@' . $info['headers']['from']['host'], 'to' => $info['headers']['to'][0]['mailbox'] . '@' . $info['headers']['from']['host'], 'verified' => !empty($info['verified']) ? $info['verified'] : NULL, 'decrypted' => !empty($info['decrypted']) ? $info['decrypted'] : NULL);
     }
     $expected_output = array('<q2gf11c048f1004281807ra1bfdc89j7c0275bcfdbc5f34@mail.gmail.com>' => array('subject' => 'A Tést of Iñtërnâtiônàlizætiøn', 'from' => 'will@flourishlib.com', 'to' => 'tests@flourishlib.com', 'verified' => NULL, 'decrypted' => NULL), '<x2rf11c048f1004281814pf5f5b26erc4d91f2bebdbd882@mail.gmail.com>' => array('subject' => 'UTF-8 …', 'from' => 'will@flourishlib.com', 'to' => 'tests@flourishlib.com', 'verified' => NULL, 'decrypted' => NULL), '<u2uf11c048f1004281816u3a62bfc7n1961eb403c5eac93@mail.gmail.com>' => array('subject' => 'More UTF-8: ⅞ ⅝ ⅜ ⅛', 'from' => 'will@flourishlib.com', 'to' => 'tests@flourishlib.com', 'verified' => NULL, 'decrypted' => NULL), '<j2kf11c048f1004281820u126d756avb7df16d022e237eb@mail.gmail.com>' => array('subject' => 'Attachments Test', 'from' => 'will@flourishlib.com', 'to' => 'tests@flourishlib.com', 'verified' => NULL, 'decrypted' => NULL), '<r2xf11c048f1004281822n5370c981r8d1c80953684dd77@mail.gmail.com>' => array('subject' => 'Inline Images and Attachments', 'from' => 'will@flourishlib.com', 'to' => 'tests@flourishlib.com', 'verified' => NULL, 'decrypted' => NULL), '<z2lf11c048f1004281828u48cb2c8ci33108197a8db660c@mail.gmail.com>' => array('subject' => 'Multiple To and Cc', 'from' => 'will@flourishlib.com', 'to' => 'tests@flourishlib.com', 'verified' => NULL, 'decrypted' => NULL), '<h2rd0cf2b3e1004281830q66be99f1j9b08abacf56b6c04@mail.gmail.com>' => array('subject' => 'Re: Multiple To and Cc', 'from' => 'flourishlib@gmail.com', 'to' => 'flourishlib@gmail.com', 'verified' => NULL, 'decrypted' => NULL), '<1284737a820.1113498215007594659.3298566658971949728@zoho.com>' => array('subject' => 'Re: Multiple To and Cc', 'from' => 'flourishlib@zoho.com', 'to' => 'flourishlib@zoho.com', 'verified' => NULL, 'decrypted' => NULL), '<8CCB5542832A7C9-1F1C-35E4@webmail-d017.sysops.aol.com>' => array('subject' => 'Re: Multiple To and Cc', 'from' => 'flourishlib@aim.com', 'to' => 'flourishlib@aim.com', 'verified' => NULL, 'decrypted' => NULL), '<4BD8E4BF.4090207@flourishlib.com>' => array('subject' => 'Re: Multiple To and Cc', 'from' => 'tests@flourishlib.com', 'to' => 'flourishlib@flourishlib.com', 'verified' => NULL, 'decrypted' => NULL), '<20100429014944.259410@gmx.com>' => array('subject' => 'Re: Multiple To and Cc', 'from' => 'flourishlib@gmx.com', 'to' => 'tests@gmx.com', 'verified' => NULL, 'decrypted' => NULL), '<4BD8E692.1000308@flourishlib.com>' => array('subject' => 'This message has been signed', 'from' => 'tests@flourishlib.com', 'to' => 'tests@flourishlib.com', 'verified' => TRUE, 'decrypted' => NULL), '<4BD8E723.2090502@flourishlib.com>' => array('subject' => 'This message has also been signed', 'from' => 'tests@flourishlib.com', 'to' => 'tests@flourishlib.com', 'verified' => TRUE, 'decrypted' => NULL));
     if ($username == 'tests@flourishlib.com') {
         $expected_output['<4BD8E7EF.1010806@flourishlib.com>'] = array('subject' => 'This message is signed and encrypted', 'from' => 'tests@flourishlib.com', 'to' => 'tests@flourishlib.com', 'verified' => TRUE, 'decrypted' => TRUE);
         $expected_output['<4BD8E815.1050209@flourishlib.com>'] = array('subject' => 'This message is encrypted', 'from' => 'tests@flourishlib.com', 'to' => 'tests@flourishlib.com', 'verified' => NULL, 'decrypted' => TRUE);
     }
     $expected_output = array_merge($expected_output, array('<14776209491fdb20ccc4f78438756ee3@flourish.wbond.net>' => array('subject' => 'This is a test of fEmail signing', 'from' => 'tests@flourishlib.com', 'to' => 'tests@flourishlib.com', 'verified' => TRUE, 'decrypted' => NULL), '<e92c457a98a30d85fcb4c98b169dd31f@flourish.wbond.net>' => array('subject' => 'This is a test of fEmail encryption', 'from' => 'tests@flourishlib.com', 'to' => 'tests@flourishlib.com', 'verified' => NULL, 'decrypted' => TRUE), '<3f6a8d86e841be31e25c1df8fd303a5d@flourish.wbond.net>' => array('subject' => 'This is a test of fEmail encryption + signing', 'from' => 'tests@flourishlib.com', 'to' => 'tests@flourishlib.com', 'verified' => TRUE, 'decrypted' => TRUE)));
     $this->assertEquals($expected_output, $messages);
 }
开发者ID:nurulimamnotes,项目名称:flourish-old,代码行数:23,代码来源:fMailboxTest.php

示例4: process

 /**
  * Processes a form and produces output dependent upon the context in which process() is called.
  *
  * If the form is not being submitted, then it will be rendered in its initial state using the ->value() you set on each
  * element and showing placeholders if set (how these are shown depends on the renderer too.)
  *
  * If the form is being submitted, then it will validate the inputs using any supplied rules and finally validate the form
  * as a whole unit. You can supply validation rules or even callbacks for any element or the whole form.
  *
  * If the validation fails, the form will be re-rendered with the previous input values and with the errors shown.
  *
  * If the validation passes, then the success method will be called. It can take whatever actions are needed to handle the form
  * and it can redirect if needed or simply return some output that will then be rendered in place of the form.
  **/
 public function process()
 {
     $submitted = false;
     $form_ok = true;
     $src = strtoupper($this->_method);
     $this->_form_id = $this->_fingerprint();
     $r = $this->_renderer;
     //
     //	Has process been called following a form submission? Submission => method matches form
     //
     if (strtoupper($_SERVER['REQUEST_METHOD']) === $src) {
         $array = "_{$src}";
         $submitted = !empty($GLOBALS[$array]);
     }
     $r->setSubmitting($submitted);
     if ($submitted) {
         if (true == $this->_meta['show_submitted']) {
             fCore::expose(array($array => $GLOBALS[$array]));
         }
         // Signal to the renderer that a submission is underway. This allows it to conditionally add
         // classes when rendering
         $r->setSubmitting(true);
         // Do the id and token match what is expected?
         $id_ok = $this->_form_id === fRequest::get('_form_id');
         if (!$id_ok) {
             return '<p>An unexpected error occured. Form id mismatch.</p>';
         }
         $this->_form_token = fRequest::get('_form_token');
         $token_ok = fxCSRFToken::check($this->_form_id, $this->_form_token);
         if (!$token_ok) {
             return '<p>An unexpected error occured. Token mismatch.</p>';
         }
         //
         //	Iterate over elements, populating their values & evaluating them
         //
         foreach ($this->_elements as $e) {
             if (!is_string($e)) {
                 $e->_getSubmittedValue()->_validate($this->errors, $this);
             }
         }
         if (empty($this->errors)) {
             //
             //	Run the form validator (if any)
             //
             $validator = $this->_validation_cb;
             if (is_callable($validator)) {
                 $v = $validator($this);
                 $form_ok = true === $v;
             }
             if ($form_ok) {
                 if (is_callable($this->_onSuccess)) {
                     $fn = $this->_onSuccess;
                     return $fn($this);
                 } else {
                     throw new fxProgrammerException("Form submission successful but no onSuccess callback defined.");
                 }
             } else {
                 return $v;
             }
         }
     }
     fxCSRFToken::clear($this->_form_id);
     $this->_form_token = fxCSRFToken::generate($this->_form_id);
     if (true == $this->_show_form_elements) {
         fCore::expose($this);
     } elseif (true == $this->_show_form_errors) {
         fCore::expose($this->errors);
     }
     if (!$this->_form_id || !$this->_form_token) {
         throw new fxProgrammerException("Form cannot be rendered without _form_id and _form_token being defined.");
     }
     return $this->renderUsing($this->_renderer, $this, $this->id);
 }
开发者ID:netcarver,项目名称:fxForm,代码行数:87,代码来源:fxForm.php

示例5: testExpose

 /**
  * @dataProvider exposeProvider
  */
 public function testExpose($value, $expected_output)
 {
     ob_start();
     fCore::expose($value);
     $output = ob_get_clean();
     $this->assertEquals($expected_output, $output);
 }
开发者ID:philip,项目名称:flourish,代码行数:10,代码来源:fCoreTest.php

示例6: renderForm

 public function renderForm(fxForm &$f)
 {
     $this->rendering_element_set = false;
     $o = array();
     $atts = $this->renderAtts($f->_getInfoExcept('name'));
     $o[] = "<form action=\"{$f->_action}\" method=\"{$f->_method}\"{$atts}>";
     $o[] = "<input type=\"hidden\" name=\"_form_id\" value=\"{$f->_form_id}\" />";
     $o[] = "<input type=\"hidden\" name=\"_form_token\" value=\"{$f->_form_token}\" />";
     if ($f->hasErrors()) {
         // Use a form errors formatting callback to override basic message.
         $formErrorsCB = $this->errorBlockFormatter;
         if (is_callable($formErrorsCB)) {
             $msg = $formErrorsCB($f);
             if (is_string($msg) && '' !== $msg) {
                 $o[] = $msg;
             }
         } else {
             $o[] = '<div class="form-errors"><p>There was a problem with your form. Please correct any errors and try again.</p></div>';
         }
     }
     foreach ($f->getElements() as $child) {
         if (is_string($child)) {
             $o[] = $child;
         } else {
             $o[] = $child->renderUsing($this, $f, $f->id);
         }
     }
     $o[] = "</form>";
     $o = implode("\n", $o);
     if (true == $f->_show_html) {
         fCore::expose($o);
     }
     return $o;
 }
开发者ID:netcarver,项目名称:fxForm,代码行数:34,代码来源:fxBasicHTMLFormRenderer.php

示例7: checkExposure

 public function checkExposure(fxFormElement &$e, $html)
 {
     if ($e->_inMeta('show_data')) {
         fCore::expose(array("Data for {$e->_name}" => $e->_getData()));
     }
     if ($e->_inMeta('show_meta')) {
         fCore::expose(array("Meta-data for {$e->_name}" => $e->_getMeta()));
     }
     if ($e->_inMeta('show_submitted')) {
         fCore::expose(array("Submitted value for {$e->name}" => $e->_value));
     }
     if ($e->_inMeta('show_elements')) {
         fCore::expose(array("{$e->name}" => $e));
     }
     if ($e->_inMeta('show_errors')) {
         fCore::expose(array("Errors for {$e->name}" => $e->_getErrors()));
     }
     if ($e->_inMeta('show_html')) {
         fCore::expose(array("HTML for {$e->name}" => $html));
     }
 }
开发者ID:netcarver,项目名称:fxForm,代码行数:21,代码来源:fxRenderer.php

示例8: carrier_pidgin_settings

function carrier_pidgin_settings(){
  fCore::expose($carriers); 
}
开发者ID:rberger,项目名称:Graphite-Tattle,代码行数:3,代码来源:carrier_pidgin_plugin.php


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