Webiny\Component\Entity\Entity::init PHP 메소드

init() 보호된 메소드

protected init ( )
    protected function init()
    {
        // Create entity cache pool
        $this->pool = $this->arr();
        // Load built-in validators
        $builtInValidators = [new Email(), new GreaterThan(), new GreaterThanOrEqual(), new GeoLocation(), new LessThan(), new LessThanOrEqual(), new MinLength(), new MaxLength(), new InArray(), new Number(), new Integer(), new Url(), new Password(), new Required(), new Phone(), new CountryCode(), new CreditCardNumber(), new EuVatNumber(), new Unique(), new Regex()];
        /* @var $v ValidatorInterface */
        foreach ($builtInValidators as $v) {
            $this->validators[$v->getName()] = $v;
        }
        // Load validators registered as a service
        $validators = $this->servicesByTag('entity-validator', '\\Webiny\\Component\\Entity\\Attribute\\Validation\\ValidatorInterface');
        foreach ($validators as $v) {
            $this->validators[$v->getName()] = $v;
        }
    }