1<?php
2
3/**
4 * FINE granularity DIFF
5 *
6 * Computes a set of instructions to convert the content of
7 * one string into another.
8 *
9 * Originally created by Raymond Hill (https://github.com/gorhill/PHP-FineDiff), brought up
10 * to date by Cog Powered (https://github.com/cogpowered/FineDiff).
11 *
12 * @copyright Copyright 2011 (c) Raymond Hill (http://raymondhill.net/blog/?p=441)
13 * @copyright Copyright 2013 (c) Robert Crowe (http://cogpowered.com)
14 * @link https://github.com/cogpowered/FineDiff
15 * @version 0.0.1
16 * @license MIT License (http://www.opensource.org/licenses/mit-license.php)
17 */
18
19namespace cogpowered\FineDiff\Parser;
20
21interface OpcodesInterface
22{
23    /**
24     * Get the opcodes.
25     *
26     * @return array
27     */
28    public function getOpcodes();
29
30    /**
31     * Set the opcodes for this parse.
32     *
33     * @param array $opcodes Elements must be an instance of cogpowered\FineDiff\Parser\Operations\OperationInterface.
34     * @throws cogpowered\FineDiff\Exceptions\OperationException
35     * @return void
36     */
37    public function setOpcodes(array $opcodes);
38
39    /**
40     * Return the opcodes in a format that can then be rendered.
41     *
42     * @return string
43     */
44    public function generate();
45
46    /**
47     * When object is cast to a string returns opcodes as string.
48     *
49     * @see Opcodes::generate
50     * @return string
51     */
52    public function __toString();
53}