canRender() public method

Can this driver render the the data?
public canRender ( string $mode ) : boolean
$mode string The mode. Either 'full', 'inline', 'info', or 'raw'.
return boolean True if the driver can render the data for the given view.
示例#1
0
 /**
  */
 public function canRender($mode)
 {
     return $mode == 'inline' && !$this->_init(true) ? false : parent::canRender($mode);
 }
示例#2
0
文件: Pgp.php 项目: raz0rsdge/horde
 /**
  * Can this driver render the data?
  *
  * @param string $mode  See parent::canRender().
  *
  * @return boolean  See parent::canRender().
  */
 public function canRender($mode)
 {
     switch ($mode) {
         case 'full':
             if ($this->_mimepart->getType() == 'application/pgp-keys') {
                 return true;
             }
             break;
         case 'raw':
             if ($this->_mimepart->getType() == 'application/pgp-signature' && $this->_mimepart->getMetadata(Horde_Crypt_Pgp_Parse::SIG_RAW)) {
                 return true;
             }
             break;
     }
     return parent::canRender($mode);
 }