load() public static method

Retrieve the CapabilityProfile with the given ID.
public static load ( string $profileName ) : CapabilityProfile
$profileName string The ID of the profile to load.
return CapabilityProfile The CapabilityProfile that was requested.
コード例 #1
0
 public function testBadFeatureNameSuggestion()
 {
     $this->setExpectedException('\\InvalidArgumentException', 'graphics');
     $profile = CapabilityProfile::load('default');
     $profile->getFeature('graphicx');
 }
コード例 #2
0
ファイル: Printer.php プロジェクト: mike42/escpos-php
 /**
  * Construct a new print object
  *
  * @param PrintConnector $connector The PrintConnector to send data to. If not set, output is sent to standard output.
  * @param CapabilityProfile $profile Supported features of this printer. If not set, the "default" CapabilityProfile will be used, which is suitable for Epson printers.
  * @throws InvalidArgumentException
  */
 public function __construct(PrintConnector $connector, CapabilityProfile $profile = null)
 {
     /* Set connector */
     $this->connector = $connector;
     /* Set capability profile */
     if ($profile === null) {
         $profile = CapabilityProfile::load('default');
     }
     $this->profile = $profile;
     /* Set buffer */
     $buffer = new EscposPrintBuffer();
     $this->buffer = null;
     $this->setPrintBuffer($buffer);
     $this->initialize();
 }
コード例 #3
0
 public static function getInstance()
 {
     return CapabilityProfile::load('P822D');
 }
コード例 #4
0
 public static function getInstance()
 {
     return CapabilityProfile::load('TEP-200M');
 }