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


PHP Part::__construct方法代码示例

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


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

示例1: __construct

 public function __construct($content = '', $filename = null, $contentType = 'application/octet-stream', $encoding = 'base64')
 {
     parent::__construct($content, $contentType, $encoding);
     $options = array();
     if ($filename !== null) {
         $options['name'] = $filename;
     }
     $this->setContentType($contentType, $options);
     $this->setContentDisposition($filename);
 }
开发者ID:vincenta,项目名称:stato,代码行数:10,代码来源:Attachment.php

示例2: __construct

 /**
  * Construct the object
  *
  * @access public
  * @param array $parts
  * @param array $classes
  * @param string $key
  * @param integer $priority
  * 
  * @throws \Zepi\Web\UserInterface\Exception Only Tab objects are allowd to add to a Tabs object.
  */
 public function __construct($parts = array(), $classes = array(), $key = '', $priority = 10)
 {
     parent::__construct(array(), $classes, $key, $priority);
     if (is_array($parts)) {
         foreach ($parts as $part) {
             if ($part instanceof \Zepi\Web\UserInterface\Layout\Tab) {
                 // Activate the first tab
                 if (count($this->parts) === 0) {
                     $part->setActive(true);
                 }
                 $this->addPart($part);
             } else {
                 throw new Exception('Only Tab objects are allowed to add to a Tabs object.');
             }
         }
     }
 }
开发者ID:zepi,项目名称:turbo-base,代码行数:28,代码来源:Tabs.php

示例3: __construct

 /**
  * Public constructor
  *
  * In addition to the parameters of Part::__construct() this constructor supports:
  * - file  filename or file handle of a file with raw message content
  * - flags array with flags for message, keys are ignored, use constants defined in \Zend\Mail\Storage
  *
  * @param  string $rawMessage  full message with or without headers
  * @throws Exception
  */
 public function __construct(array $params)
 {
     if (isset($params['file'])) {
         if (!is_resource($params['file'])) {
             $params['raw'] = @file_get_contents($params['file']);
             if ($params['raw'] === false) {
                 throw new Exception\RuntimeException('could not open file');
             }
         } else {
             $params['raw'] = stream_get_contents($params['file']);
         }
     }
     if (!empty($params['flags'])) {
         // set key and value to the same value for easy lookup
         $this->_flags = array_combine($params['flags'], $params['flags']);
     }
     parent::__construct($params);
 }
开发者ID:bradley-holt,项目名称:zf2,代码行数:28,代码来源:Message.php

示例4: __construct

 public function __construct($part_no)
 {
     parent::__construct($part_no, array('Component' => 'grp', 'Amperage' => 'amps', 'Busway Type' => 'frame_type'));
     $this->_details = $this->fetchDetails();
     $this->setPricing($this->_details['display']);
 }
开发者ID:morganney,项目名称:livewire,代码行数:6,代码来源:BUPart.class.php

示例5: __construct

 public function __construct($stream, $messageNumber, $partNumber = null, $structure = null)
 {
     parent::__construct($stream, $messageNumber, $partNumber, $structure);
 }
开发者ID:ctalbot,项目名称:imap,代码行数:4,代码来源:Attachment.php

示例6: __construct

 public function __construct($rawmessage = '')
 {
     $this->date = time();
     parent::__construct($rawmessage);
 }
开发者ID:dapepe,项目名称:tymio,代码行数:5,代码来源:mail.php

示例7: __construct

 /**
  * Construct the object
  *
  * @access public
  * @param array $parts
  * @param array $classes
  * @param string $key
  * @param string $name
  * @param integer $priority
  */
 public function __construct($parts = array(), $classes = array(), $key = '', $name = '', $priority = 10)
 {
     parent::__construct($parts, $classes, $key, $priority);
     $this->name = $name;
 }
开发者ID:zepi,项目名称:turbo-base,代码行数:15,代码来源:Tab.php

示例8: __construct

 public function __construct($part_no)
 {
     parent::__construct($part_no, array('Connection' => 'conn', 'Frame Type' => 'frame_type', 'Amperage' => 'amps', 'Poles' => 'poles', 'Voltage' => 'volts'));
     $this->_details = $this->fetchDetails();
     $this->setPricing($this->_details['display']);
 }
开发者ID:morganney,项目名称:livewire,代码行数:6,代码来源:CBPart.class.php

示例9: __construct

 public function __construct($part_no)
 {
     parent::__construct($part_no, array('KVA' => 'kva', 'Weight' => 'weight', 'Primary Voltage' => 'input_volts', 'Secondary Voltage' => 'output_volts'));
     $this->_details = $this->fetchDetails();
     $this->setPricing($this->_details['display']);
 }
开发者ID:morganney,项目名称:livewire,代码行数:6,代码来源:TRPart.class.php

示例10: __construct

 public function __construct($part_no)
 {
     parent::__construct($part_no, array());
     $this->_details = $this->fetchDetails();
     $this->setPricing($this->_details['display']);
 }
开发者ID:morganney,项目名称:livewire,代码行数:6,代码来源:MCPart.class.php


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