for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
*
* This file is part of the Aura project for PHP.
* @package Aura.Marshal
* @license https://opensource.org/licenses/mit-license.php MIT
*/
namespace Aura\Marshal\Lazy;
use Aura\Marshal\Relation\RelationInterface;
* A builder for Lazy objects.
class Builder implements BuilderInterface
{
* The class to use for new instances.
* @var class-string<LazyInterface>
class-string<LazyInterface>
0
protected $class = 'Aura\Marshal\Lazy\GenericLazy';
* Creates a new Lazy object.
* @param RelationInterface $relation The relationship object between the
* native and foreign types.
* @return LazyInterface
public function newInstance(RelationInterface $relation)
$class = $this->class;
return new $class($relation);
}