Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/Isolate/LazyObjects/Exception/Exception.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace Isolate\LazyObjects\Exception;

/**
* @api
*/
class Exception extends \Exception
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace Isolate\LazyObjects\Exception;

/**
* @api
*/
class InvalidArgumentException extends Exception
{
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace Isolate\LazyObjects\Exception;

/**
* @api
*/
class NotExistingPropertyException extends Exception
{
}
3 changes: 3 additions & 0 deletions src/Isolate/LazyObjects/Exception/RuntimeException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace Isolate\LazyObjects\Exception;

/**
* @api
*/
class RuntimeException extends Exception
{
}
5 changes: 5 additions & 0 deletions src/Isolate/LazyObjects/Object/Property/Initializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
use Isolate\LazyObjects\Object\PropertyAccessor;
use Isolate\LazyObjects\Proxy\LazyProperty;

/**
* @api
*/
final class Initializer
{
/**
Expand All @@ -29,6 +32,8 @@ public function __construct()
* @param string $triggerMethod
* @param $targetObject
* @throws InvalidArgumentException
*
* @api
*/
public function initialize($lazyProperties = [], $triggerMethod, $targetObject)
{
Expand Down
7 changes: 7 additions & 0 deletions src/Isolate/LazyObjects/Object/PropertyAccessor.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
use Isolate\LazyObjects\Object\Value\Assembler;
use Isolate\LazyObjects\Object\Value\AssemblerFactory;

/**
* @api
*/
class PropertyAccessor
{
/**
Expand All @@ -15,6 +18,8 @@ class PropertyAccessor
* @param $value
* @throws InvalidArgumentException
* @throws NotExistingPropertyException
*
* @api
*/
public function set($object, $propertyName, $value)
{
Expand All @@ -32,6 +37,8 @@ public function set($object, $propertyName, $value)
* @return mixed
* @throws InvalidArgumentException
* @throws NotExistingPropertyException
*
* @api
*/
public function get($object, $propertyName)
{
Expand Down
5 changes: 5 additions & 0 deletions src/Isolate/LazyObjects/Proxy/ClassName.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

use Isolate\LazyObjects\Exception\InvalidArgumentException;

/**
* @api
*/
class ClassName
{
/**
Expand Down Expand Up @@ -35,6 +38,8 @@ public function __toString()
/**
* @param $object
* @return bool
*
* @api
*/
public function itFits($object)
{
Expand Down
11 changes: 11 additions & 0 deletions src/Isolate/LazyObjects/Proxy/Definition.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

use Isolate\LazyObjects\Exception\InvalidArgumentException;

/**
* @api
*/
class Definition
{
/**
Expand Down Expand Up @@ -39,6 +42,8 @@ public function __construct(ClassName $className, array $lazyProperties = [], ar

/**
* @return ClassName
*
* @api
*/
public function getClassName()
{
Expand All @@ -48,6 +53,8 @@ public function getClassName()
/**
* @param $object
* @return bool
*
* @api
*/
public function describeProxyFor($object)
{
Expand All @@ -56,6 +63,8 @@ public function describeProxyFor($object)

/**
* @return array|LazyProperty[]
*
* @api
*/
public function getLazyProperties()
{
Expand All @@ -64,6 +73,8 @@ public function getLazyProperties()

/**
* @return array
*
* @api
*/
public function getMethodReplacements()
{
Expand Down
5 changes: 5 additions & 0 deletions src/Isolate/LazyObjects/Proxy/Factory.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@

namespace Isolate\LazyObjects\Proxy;

/**
* @api
*/
interface Factory
{
/**
* @param mixed $object
* @param Definition $definition
* @return mixed $object
*
* @api
*/
public function createProxy($object, Definition $definition);
}
17 changes: 17 additions & 0 deletions src/Isolate/LazyObjects/Proxy/LazyProperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
use Isolate\LazyObjects\Proxy\Property\Name;
use Isolate\LazyObjects\Proxy\Property\ValueInitializer;

/**
* @api
*/
class LazyProperty
{
/**
Expand Down Expand Up @@ -50,6 +53,8 @@ public function __construct(Name $name, ValueInitializer $valueInitializer, $tri

/**
* @return ValueInitializer
*
* @api
*/
public function getValueInitializer()
{
Expand All @@ -58,6 +63,8 @@ public function getValueInitializer()

/**
* @return string
*
* @api
*/
public function getName()
{
Expand All @@ -66,6 +73,8 @@ public function getName()

/**
* @return bool
*
* @api
*/
public function hasTriggers()
{
Expand All @@ -75,6 +84,8 @@ public function hasTriggers()
/**
* @param $methodName
* @return bool
*
* @api
*/
public function isTriggeredBy($methodName)
{
Expand All @@ -89,6 +100,8 @@ public function isTriggeredBy($methodName)

/**
* @param InitializationCallback $initializationCallback
*
* @api
*/
public function setInitializationCallback(InitializationCallback $initializationCallback)
{
Expand All @@ -97,6 +110,8 @@ public function setInitializationCallback(InitializationCallback $initialization

/**
* @return bool
*
* @api
*/
public function hasInitializationCallback()
{
Expand All @@ -105,6 +120,8 @@ public function hasInitializationCallback()

/**
* @return InitializationCallback
*
* @api
*/
public function getInitializationCallback()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@

namespace Isolate\LazyObjects\Proxy\LazyProperty;

/**
* @api
*/
interface InitializationCallback
{
/**
* @param mixed $defaultValue
* @param mixed $newValue
* @param mixed $targetObject
*
* @api
*/
public function execute($defaultValue, $newValue, $targetObject);
}
5 changes: 5 additions & 0 deletions src/Isolate/LazyObjects/Proxy/Method.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

use Isolate\LazyObjects\Exception\InvalidArgumentException;

/**
* @api
*/
class Method
{
/**
Expand Down Expand Up @@ -36,6 +39,8 @@ public function __toString()
/**
* @param $method
* @return bool
*
* @api
*/
public function isEqualTo($method)
{
Expand Down
5 changes: 5 additions & 0 deletions src/Isolate/LazyObjects/Proxy/Method/Replacement.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

use Isolate\LazyObjects\WrappedObject;

/**
* @api
*/
interface Replacement
{
/**
Expand All @@ -14,6 +17,8 @@ interface Replacement
* @param string $methodName
* @param array $params
* @return mixed
*
* @api
*/
public function execute(WrappedObject $proxy, $methodName, array $params = []);
}
7 changes: 7 additions & 0 deletions src/Isolate/LazyObjects/Proxy/MethodReplacement.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

use Isolate\LazyObjects\Proxy\Method\Replacement;

/**
* @api
*/
class MethodReplacement
{
/**
Expand All @@ -27,6 +30,8 @@ public function __construct(Method $method, Replacement $replacement)

/**
* @return Replacement
*
* @api
*/
public function getReplacement()
{
Expand All @@ -35,6 +40,8 @@ public function getReplacement()

/**
* @return Method
*
* @api
*/
public function getMethod()
{
Expand Down
3 changes: 3 additions & 0 deletions src/Isolate/LazyObjects/Proxy/Property/Name.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

use Isolate\LazyObjects\Exception\InvalidArgumentException;

/**
* @api
*/
class Name
{
/**
Expand Down
5 changes: 5 additions & 0 deletions src/Isolate/LazyObjects/Proxy/Property/ValueInitializer.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

namespace Isolate\LazyObjects\Proxy\Property;

/**
* @api
*/
interface ValueInitializer
{
/**
Expand All @@ -12,6 +15,8 @@ interface ValueInitializer
* @param mixed $object that property holds the property.
* @param mixed $defaultPropertyValue default of property that was set before initialization
* @return mixed
*
* @api
*/
public function initialize($object, $defaultPropertyValue);
}
9 changes: 9 additions & 0 deletions src/Isolate/LazyObjects/WrappedObject.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,29 @@
use Isolate\LazyObjects\Proxy\LazyProperty;
use Isolate\LazyObjects\Proxy\MethodReplacement;

/**
* @api
*/
interface WrappedObject
{
/**
* @return mixed
*
* @api
*/
public function getWrappedObject();

/**
* @return array|LazyProperty[]
*
* @api
*/
public function getLazyProperties();

/**
* @return array|MethodReplacement[]
*
* @api
*/
public function getMethodReplacements();
}
Loading