Adds accessor

@param string $accessor

@throws \InvalidArgumentException
972688
public function addAccessor($accessor)
    {
        if (in_array($accessor, $this->accessorDefaults['getter'])) {
            $this->addGetter($accessor);
        } elseif (in_array($accessor, $this->accessorDefaults['setter'])) {
            $this->addSetter($accessor);
        } else {
            throw new \InvalidArgumentException(sprintf('Unexpected property accessor "%s" available accessors are [get,is,bind,set]', $accessor));
        }

    }
97296
public function addOptions($options)
    {
        if (is_string($options)) {
            $this->mergeOptions($this->optionParser->parseString($options));
        } elseif (is_array($options)) {
            $this->mergeOptions($this->optionParser->parseArray($options));
        } else {
            throw new \InvalidArgumentException("Getopt(): argument must be string or array");
        }
    }
644232
public function add($value)
    {
        if (! $value instanceof SpecificationInterface) {
            throw new InvalidArgumentException(sprintf(
                '"%s" does not implement "%s"!',
                (is_object($value)) ? get_class($value) : $value,
                SpecificationInterface::class
            ));
        }

        return parent::add($value);
    }
169179
public function add(LayoutBoxConfiguratorInterface $configurator)
    {
        $type = $configurator->getType();
        if ($this->has($type)) {
            throw new \InvalidArgumentException(sprintf('Layout box configurator "%s" already exists.', $type));
        }
        $this->items[$configurator->getType()] = $configurator;
    }
1015067
public function add($value)
    {
        if (!$value instanceof Contact) {
            throw new InvalidArgumentException(
                sprintf(
                    '%s only accepts instances of %s.',
                    __FUNCTION__, Contact::class
                )
            );
        }

        return parent::add($value);
    }
302975
public function add( Descriptor $argDescriptor ) : Support
   {

      $this->_attributes[ $argDescriptor->getName() ] = $argDescriptor;

      return $this;

   }
1178483
public function addExecutor(ExecutorInterface $executor)
    {
        $action = $executor->getName();

        if ($this->hasExecutor($action)) {
            throw new \InvalidArgumentException(sprintf(
                'There is already an executor registered for action "%s".',
                $action
            ));
        }

        $this->executors[$action] = $executor;
    }
1260119
public function addValidator($validator)
    {
        if (!$validator instanceof ValidatorInterface) {
            if (!is_callable($validator)) {
                throw new \InvalidArgumentException('Validator should be callable or ValidatorInterface.');
            }

            $validator = new CallbackValidator($validator);
        }

        $this->validators[] = $validator;

        return $this;
    }
1308352
public function add($roleUri, $accessUri)
    {
        
		$module = new \core_kernel_classes_Resource($accessUri);
		$role = new \core_kernel_classes_Resource($roleUri);
		$moduleAccessProperty = new \core_kernel_classes_Property(static::PROPERTY_ACL_GRANTACCESS);
		
		$values = $role->getPropertyValues($moduleAccessProperty);
		if (!in_array($module->getUri(), $values)) {
		    $role->setPropertyValue($moduleAccessProperty, $module->getUri());
            $this->getEventManager()->trigger(new AccessRightAddedEvent($roleUri, $accessUri));
            CacheHelper::cacheModule($module);
		} else {
		    \common_Logger::w('Tried to add role '.$role->getUri().' again to controller '.$accessUri);
		}
        
    }
1156676
public function addInstaller(InstallerInterface $installer)
    {
        $installerClass = get_class($installer);

        if (!isset($this->installers[$installerClass])) {
            if ($installer instanceof OrderedInstallerInterface && $installer instanceof DependentInstallerInterface) {
                throw new \InvalidArgumentException(sprintf('Class "%s" can\'t implement "%s" and "%s" at the same time.',
                    $installerClass,
                    'OrderedInstallerInterface',
                    'DependentInstallerInterface'));
            } elseif ($installer instanceof OrderedInstallerInterface) {
                $this->orderInstallersByNumber = true;
            } elseif ($installer instanceof DependentInstallerInterface) {
                $this->orderInstallersByDependencies = true;
                foreach ($installer->getDependencies() as $class) {
                    $this->addInstaller(new $class);
                }
            }

            $this->installers[$installerClass] = $installer;
        }
    }
254376
public function add(DescriptorInterface $descriptor)
    {
        $key = $this->makeKey($descriptor->getName());

        $descriptor->setManager($this);

        $this->descriptors[$key] = $descriptor;
    }
1003685
protected function addClass(string $class)
    {
        if ($this->initialized) {
            throw new RuntimeException("You can't register provider class as registry as been initialized.");
        }

        if (!class_exists($class)) {
            throw new InvalidArgumentException("Class $class does not exist.");
        }

        if (!is_subclass_of($class, ProviderInterface::class)) {
            throw new InvalidArgumentException("Class $class must implement " . ProviderInterface::class);
        }

        $this->classes[] = $class;
    }
775491
public function addAttributes( $attributes = array() )
	{
		foreach( $attributes as $key => $value )
		{
			if( $key == 'class' )
			{
				if( is_string( $value ) )
					$value	= explode( " ", $value );
				if( !is_array( $value ) && !( $value instanceof ArrayIterator ) )
					throw new InvalidArgumentException( 'Class attribute must be string, array or iterator' );
				foreach( $value as $class )
					$this->addClass( $class );
				continue;
			}
			else
				$this->attributes[$key]	= $value;
		}
	}
422917
public function add($value)
    {
        if ( ! is_scalar($value)) {
            throw new InvalidArgumentException(sprintf(
                'Argument 1 passed to %s must be a scalar value, %s given',
                __METHOD__,
                is_object($value) ? get_class($value) : gettype($value)
            ));
        }

        parent::offsetSet(null, $value);
    }
887810
public function addValidator(ValidatorInterface $validator)
    {
        if ($validator instanceof ObjectValidatorInterface) {
            $validator->setValidatedInstancesContainer = $this->validatedInstancesContainer;
        }
        $this->validators->attach($validator);
    }
592668
public function setIsUnaryOperator($isUnaryOperator = true)
    {
        if (! is_a($this->getSymbol(), AbstractOperator::class)) {
            throw new \InvalidArgumentException(
                'Error: Cannot mark node as unary operator, because symbol is not an operator but of type "'.
                gettype($this->getSymbol()).'"'
            );
        }

        $this->isUnaryOperator = $isUnaryOperator;
    }
86220
public function addHeader(string $name, string $value) : self
    {
        $name = $this->normalizeHeader($name);
        if (isset($this->headers[$name])) {
            throw new \InvalidArgumentException(
                sprintf("Header %s is already set with value '%s'", $name, $this->headers[$name])
            );
        }

        $this->headers[$name] = $value;

        return $this;
    }