Add story to book

@param []Story ...$stories
501531
public function addStories(Story ...$stories): void
    {
        \array_walk($stories, function ($story) {
            $this->stories[] = $story;
            $this->storyCount++;
        });
    }
403617
function addTo($to) {
		if(!is_array($to)) {
			$this->to[] = $to;
		}
		else {
			$this->to = array_merge($this->to, $to);
		}
	}
592807
private function getStoriesSortedByName(): array
    {
        $stories = $this->stories;
        \usort($stories, function(Story $storyA, Story $storyB) {
            return $storyA->getName() <=> $storyB->getName();
        });

        return $stories;
    }
264711
public function setCollections(array $value)
    {
        if (array_key_exists('read', $value)) {
            $this->setReadCollections($value['read']);
        }
        if (array_key_exists('write', $value)) {
            $this->setWriteCollections($value['write']);
        }
    }
326249
function write($level,$text,$context = []){
		if(isset($this->log[$level])){
		
			$log = $this->log[$level];

			$log->addRecord($level,$text,$context);
		}
	}
1331213
public function addWords(array $words)
    {
        $query = $this->dbHandler->createInsertQuery();
        $query->insertInto('ezsearch_word');

        $word = null;

        $query->set(
            'word',
            ':word'
        )->set(
            'object_count',
            '1'
        );
        $stmt = $query->prepare();
        foreach ($words as $word) {
            $stmt->execute(['word' => $word]);
        }
    }
1361306
public function addApps(ArrayCollection $apps)
    {
        foreach ($apps as $app) {
            $app->addPage($this);
            $this->apps->add($app);
        }
    }
123676
function addLib($name) {
        if (isset($this->_libs[$name])) return;
        if (isset(self::$libs[$name])) {
            $this->_libs[$name] = true;
            $this->addFromArray(self::$libs[$name]);
        }
    }
471350
private void addBook(String isbn, String title, String synopsis, int quantity) {
        Book book = new Book();
        book.setIsbn(isbn);
        book.setTitle(title);
        book.setSynopsis(synopsis);
        isbns_to_books.put(isbn, book);
        isbns_to_quantities.put(isbn, quantity);
    }
507511
public function addColumns($columns)
    {
        foreach ($columns as $name => $value) {
            try {
                $this->addColumn($name, $value);
            } catch (Exception $e) {
            }
        }

        if (!empty($e)) {
            throw $e;
        }
    }
290038
public function addManyToManyCollections($collections)
    {
        if (!is_array($collections)) {
            $collections = [$collections];
        }
        $this->manyToManyCollections = array_merge($this->manyToManyCollections, $collections);

        return $this;
    }
1100909
public function addRawFromAssocArray($lines, $indentation = 0)
	{
		foreach ($lines as $key => $value)
		{
			if (is_array($value))
			{
				$this->addLine($key . ': [', array("indentation"=>$indentation));
				$this->addRawFromAssocArray($value, $indentation + 1);
				$this->addLine(']', array("indentation"=>$indentation));
			}
			else
			{
				$this->addLine($key . ': ' . $value, array("indentation"=>$indentation));
			}
		}
	}
1116470
public function addColumns(array $columns)
    {
        /*
         * Build a final collection of list column objects
         */
        foreach ($columns as $columnName => $config) {
            $this->allColumns[$columnName] = $this->makeListColumn($columnName, $config);
        }
    }
126475
public function addJoin(array $joins): void
    {
        if (empty($joins)) {
            return;
        }

        foreach ($joins as $join) {
            $keyword = strtoupper($join['type']);
            $pattern = '%s JOIN %s ON %s %s %s';
            $this->statement .= sprintf(
                $pattern,
                $keyword,
                $this->quoteName($join['table']),
                $this->quoteName($join['key']),
                $join['operator'],
                $this->quoteName($join['value'])
            );
            $this->statement .= PHP_EOL;
        }
    }
503194
protected function _render($story, $paths, $data)
    {
        settype($paths, 'array');

        foreach ($paths as $path) {
            if ($this->_template->findFile($path)) {
                return $this->_template->loadFile($path, $data)->render();
            }
        }

        try {
            return $this->_template->loadTemplate($story->name, $data)->render();
        } catch (Exception $e) {
            print '<small>file missing :'.$path.'</small>';
        }
    }
178816
public function add($infos)
    {
        array_push($this->infos, $infos);
        
        if (!isset($this->infos['fields'])) {
            $this->infos['fields'] = ["*"];
        }

        if (isset($infos['join'])) {
            array_push($this->joins, $infos['join']);
        }
        
        $this->mergeSqlInformation();
    }
539855
public function add($text, $value){
		$this->radios[] = array($text, $value);
		$this->validator->addPossibility($value);
	}