Skip to content

Commit

Permalink
Split TypeInterface in 2 interfaces to fix inheritance issue in php <…
Browse files Browse the repository at this point in the history
…= 5.3.8
  • Loading branch information
raulfraile committed Oct 3, 2013
1 parent da248cf commit 90fb54b
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/Ladybug/Type/AbstractType.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
/**
* AbstractType is the base type all specific types extends from
*/
abstract class AbstractType implements TypeInterface, RenderizableTypeInterface
abstract class AbstractType implements RenderizableTypeInterface, LoadableInterface
{

const TYPE_ID = '';
Expand Down
25 changes: 25 additions & 0 deletions src/Ladybug/Type/LoadableInterface.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<?php

/*
* This file is part of the Ladybug package.
*
* (c) Raul Fraile <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/

namespace Ladybug\Type;

interface LoadableInterface
{

/**
* Loads the variable into the type object.
* @param mixed $var Variable
* @param int $level Level
*
* @return bool
*/
public function load($var, $level = 1);
}
3 changes: 1 addition & 2 deletions src/Ladybug/Type/RenderizableTypeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace Ladybug\Type;

interface RenderizableTypeInterface
interface RenderizableTypeInterface extends TypeInterface
{

/**
Expand All @@ -28,6 +28,5 @@ public function isComposed();

public function getInlineValue();

public function getLevel();

}
9 changes: 0 additions & 9 deletions src/Ladybug/Type/TypeInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,6 @@
interface TypeInterface
{

/**
* Loads the variable into the type object.
* @param mixed $var Variable
* @param int $level Level
*
* @return bool
*/
public function load($var, $level = 1);

/**
* Sets the level.
* @param int $level Level
Expand Down

0 comments on commit 90fb54b

Please sign in to comment.