Yo all your subscribers with or without a Link object.
/!\ only one Yo all once per minute /!\

@see http://docs.justyo.co/v1.0/docs/yoall

@param  Link              $link (optional)
@throws \RuntimeException
353235
public function all(Link $link = null)
    {
        $data = $this->createData(array(
            'api_token' => $this->apiToken,
        ), $link);

        $this->send('yoall/', InternalRequestInterface::METHOD_POST, $data);
    }
1248974
protected function setLink($link)
    {
        self::writeFullTag(
            $link,
            'link',
            false,
            'link',
            $this->validator,
            'validateLink',
            $this->exception,
            'Provided link is not a valid value.'
        );

        return $this;
    }
992387
public function write($content)
    {
        if ($this->isReadable()) {
            throw new \RuntimeException("Cannot write to a readable message");
        }

        $this->writable = true;
        $content = trim($content);
        fwrite($this->resource, $content . "\n");
    }
1367552
public function setBaseUrl(string $name, string $link): void
	{
		$this->baseUrl = new \stdClass;
		$this->baseUrl->name = $name;
		$this->baseUrl->link = $link;
	}
1011929
@SuppressWarnings("unchecked")
	public T add(Link link) {

		Assert.notNull(link, "Link must not be null!");

		this.links.add(link);

		return (T) this;
	}
259466
public function linkToMany($model, $link): void
    {
        Relations::setRelations($this->model, $model, [$link]);
    }
379440
protected function processLinkHtml($link)
    {
        $_html  = !empty($link[0]) ? $link[0] : '';
        $_href  = !empty($link[1]) ? $link[1] : '';
        $_url   = !empty($link[2]) ? $link[2] : '';
        $_title = isset($link[3]) && strip_tags($link[3]) ? strip_tags($link[3]) : $_url;

        // --------------------------------------------------------------------------

        /**
         * Only process if there's at least the HTML tag and a detected URL
         * otherwise it's not worth it/possible to accurately replace the tag
         */

        if ($_html && $_url) {
            $_html = $this->processLinkGenerate($_html, $_url, $_title, true);
        }

        return $_html;
    }
1225696
public function setBreacrumbLinks($links) {
        if(is_array($links) && !empty($links)) {
            $this->links = $links;
        }
        return $this;
    }
1050221
public function merge(self $link)
    {
        $this->parameters = array_replace(
            $link->getParameters(),
            $this->parameters
        );

        $this->metadata = array_replace(
            $link->getMetadata(),
            $this->metadata
        );
    }
537077
protected function rssFeed($blogPosts, $link)
    {
        $rss = RSSFeed::create($blogPosts, $link, $this->MetaTitle, $this->MetaDescription);

        $this->extend('updateRss', $rss);

        return $rss->outputToBrowser();
    }
255224
public function setLink($link)
    {
        if (strlen($link) == 0) {
            throw new \InvalidArgumentException(sprintf('Image link should not be empty'));
        }

        $this->link = $link;

        return $this;
    }
1282563
public function isolateDailymotionVideoCode($link)
    {
        try {
            if (preg_match('!^.+dailymotion\.com/(video|hub)/([^_]+)[^#]*(#video=([^_&]+))?|(dai\.ly/([^_]+))!', $link, $matches)) {
                if (isset($matches[6])) {
                    return $matches[6];
                }
                if (isset($matches[4])) {
                    return $matches[4];
                }

                return $matches[2];
            }

            return false;
        } catch (\Exception $e) {
            throw new VideoException("can't match dailymotion code in given url", $e);
        }
    }
41676
public function historizeId($id, $link)
    {
        try {
            $this->innerGateway->historizeId($id, $link);
        } catch (DBALException $e) {
            throw new \RuntimeException('Database error', 0, $e);
        } catch (PDOException $e) {
            throw new \RuntimeException('Database error', 0, $e);
        }
    }
899017
public function click(Link $link)
    {
        if ($link instanceof Form) {
            return $this->submit($link);
        }

        return $this->request($link->getMethod(), $link->getUri());
    }
146473
public function addLink(Link $link)
    {
        if (!$this->links) {
            $this->links = [];
        }
        $this->links[] = $link;
    }
1007299
public function loadResourceLink($resourceLink)
    {

        if (!empty($resourceLink->getRecordId())) {
            $sql = 'SELECT resource_link_pk, context_pk, consumer_pk, lti_resource_link_id, settings, primary_resource_link_pk, share_approved, created, updated ' .
                   "FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' ' .
                   'WHERE (resource_link_pk = :id)';
            $query = $this->db->prepare($sql);
            $query->bindValue('id', $resourceLink->getRecordId(), PDO::PARAM_INT);
        } else if (!empty($resourceLink->getContext())) {
            $sql = 'SELECT resource_link_pk, context_pk, consumer_pk, lti_resource_link_id, settings, primary_resource_link_pk, share_approved, created, updated ' .
                   "FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' ' .
                   'WHERE (context_pk = :id) AND (lti_resource_link_id = :rlid)';
            $query = $this->db->prepare($sql);
            $query->bindValue('id', $resourceLink->getContext()->getRecordId(), PDO::PARAM_INT);
            $query->bindValue('rlid', $resourceLink->getId(), PDO::PARAM_STR);
        } else {
            $sql = 'SELECT r.resource_link_pk, r.context_pk, r.consumer_pk, r.lti_resource_link_id, r.settings, r.primary_resource_link_pk, r.share_approved, r.created, r.updated ' .
                   "FROM {$this->dbTableNamePrefix}" . DataConnector::RESOURCE_LINK_TABLE_NAME . ' r LEFT OUTER JOIN ' .
                   $this->dbTableNamePrefix . DataConnector::CONTEXT_TABLE_NAME . ' c ON r.context_pk = c.context_pk ' .
                   ' WHERE ((r.consumer_pk = :id1) OR (c.consumer_pk = :id2)) AND (lti_resource_link_id = :rlid)';
            $query = $this->db->prepare($sql);
            $query->bindValue('id1', $resourceLink->getConsumer()->getRecordId(), PDO::PARAM_INT);
            $query->bindValue('id2', $resourceLink->getConsumer()->getRecordId(), PDO::PARAM_INT);
            $query->bindValue('rlid', $resourceLink->getId(), PDO::PARAM_STR);
        }
        $ok = $query->execute();
        if ($ok) {
          $row = $query->fetch(PDO::FETCH_ASSOC);
          $ok = ($row !== FALSE);
        }

        if ($ok) {
            $row = array_change_key_case($row);
            $resourceLink->setRecordId(intval($row['resource_link_pk']));
            if (!is_null($row['context_pk'])) {
                $resourceLink->setContextId(intval($row['context_pk']));
            } else {
                $resourceLink->setContextId(null);
            }
            if (!is_null($row['consumer_pk'])) {
                $resourceLink->setConsumerId(intval($row['consumer_pk']));
            } else {
                $resourceLink->setConsumerId(null);
            }
            $resourceLink->ltiResourceLinkId = $row['lti_resource_link_id'];
            $settings = unserialize($row['settings']);
            if (!is_array($settings)) {
                $settings = array();
            }
            $resourceLink->setSettings($settings);
            if (!is_null($row['primary_resource_link_pk'])) {
                $resourceLink->primaryResourceLinkId = intval($row['primary_resource_link_pk']);
            } else {
                $resourceLink->primaryResourceLinkId = null;
            }
            $resourceLink->shareApproved = (is_null($row['share_approved'])) ? null : (intval($row['share_approved']) === 1);
            $resourceLink->created = strtotime($row['created']);
            $resourceLink->updated = strtotime($row['updated']);
        }

        return $ok;

    }
937170
public function setLink($link)
    {
        if (strlen($link) == 0) {
            throw new \InvalidArgumentException(sprintf('TextInput link should not be empty'));
        }

        if (!preg_match('@^https?://@', $link)) {
            throw new \InvalidArgumentException(sprintf('Invalid url: %s', $link));
        }

        $this->link = $link;

        return $this;
    }