for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* File was created 02.10.2015 11:35
*
* @author Karsten J. Gerber <[email protected]>
*/
namespace PeekAndPoke\Component\Psi\Psi\Str;
use PeekAndPoke\Component\Psi\Functions\ParameterizedUnaryFunction;
use PeekAndPoke\Types\LocalDate;
use PeekAndPoke\Types\ValueHolder;
* ToLocalDate maps a string to a LocalDate object using the given parameter as the timezone
* @see ParameterizedUnaryFunction
* @see ToLocalDateTest
class ToLocalDate extends ParameterizedUnaryFunction
{
* @param string|\DateTimeZone|ValueHolder $timezone
public function __construct($timezone)
parent::__construct($timezone);
}
* @param mixed $input
* @return LocalDate
public function __invoke($input)
return new LocalDate($input, $this->getValue());