Skip to content

Additional commands#5

Open
RamyTalal wants to merge 2 commits into
masterfrom
additional-commands
Open

Additional commands#5
RamyTalal wants to merge 2 commits into
masterfrom
additional-commands

Conversation

@RamyTalal

Copy link
Copy Markdown
Owner

Adding additional commands for the printer.

@RamyTalal RamyTalal changed the title Work in progress Additional commands Mar 7, 2018
@vincentckk

Copy link
Copy Markdown

namespace Talal\LabelPrinter\Command;

class CharColor implements CommandInterface
{
const BLACK = 1;
const RED = 2;

/**
 * @var int
 */
protected $color;

/**
 * @param int $style
 */
public function __construct($color = self::BLACK)
{
    $this->color = $color;
}

/**
 * @inheritdoc
 */
public function read()
{
    return chr(27) . 'iW' . chr($this->color);
}

}

Comment thread src/Command/Barcode.php
{
$this->addOption(new Format($this->format), 0);
$this->addOption(new Character(Character::OFF), 1);
$this->addOption(new Height(48), 2);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$this->addOption(new Height(48), 2);
$this->addOption(new Height(48), 3);

Comment thread src/Command/Barcode.php
$this->addOption(new Format($this->format), 0);
$this->addOption(new Character(Character::OFF), 1);
$this->addOption(new Height(48), 2);
$this->addOption(new Width(Width::SMALL), 3);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$this->addOption(new Width(Width::SMALL), 3);
$this->addOption(new Width(Width::SMALL), 4);

Comment thread src/Command/Barcode.php
$this->addOption(new Character(Character::OFF), 1);
$this->addOption(new Height(48), 2);
$this->addOption(new Width(Width::SMALL), 3);
$this->addOption(new Parenthesis(Parenthesis::ON), 4);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
$this->addOption(new Parenthesis(Parenthesis::ON), 4);
$this->addOption(new Parenthesis(Parenthesis::ON), 2);

@kcasarez kcasarez left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Removed some extra characters that I don't know why they were added.


public function read()
{
return 't' . $this->value . 'sp';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return 't' . $this->value . 'sp';
return 't' . $this->value;


public function read()
{
return 'r' . $this->value . 'uxy';

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
return 'r' . $this->value . 'uxy';
return 'r' . $this->value;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants