A person or organization that supports a thing through a pledge, promise, or financial contribution.
e.g. a sponsor of a Medical Study or a corporate sponsor of an event.

@param Organization|Person $sponsor
@return static
507730
public function setSponsor($sponsor)
    {
        ObjectHelper::isInstanceOf($sponsor, [Organization::class, PersonInterface::class]);
        
        $this->_sponsor = $sponsor;
        return $this;
    }
695792
public function getUserEntityByIdentifier(string $userIdentifier): UserEntity
    {
        return new UserEntity(Member::get()->filter(['Email' => $userIdentifier])->first());
    }
917269
public function add($member)
    {
        if (is_array($member)) {
            foreach ($member as $item) {
                $this->add($item);
            }

            return $this;
        }

        if (!is_callable($member)) {
            throw new InvalidChainMember();
        }

        $this->members[] = $member;

        return $this;
    }
622170
private StatementResult employ( final Transaction tx, final String person, final String company )
    {
        return tx.run( "MATCH (person:Person {name: $person_name}) " +
                        "MATCH (company:Company {name: $company_name}) " +
                        "CREATE (person)-[:WORKS_FOR]->(company)",
                parameters( "person_name", person, "company_name", company ) );
    }
419717
protected function supportSubject($subject)
    {
        if (is_object($subject)) {
            return $this->supportClasses(
                $subject,
                array(
                    'OpenOrchestra\ModelInterface\Model\ContentTypeInterface',
                    'OpenOrchestra\ModelInterface\Model\WorkflowProfileInterface',
                    'OpenOrchestra\ModelInterface\Model\StatusInterface'
                )
            );
        }

        return in_array(
            $subject,
            array(
                ContentTypeInterface::ENTITY_TYPE,
                WorkflowProfileInterface::ENTITY_TYPE,
                StatusInterface::ENTITY_TYPE
            )
        );
    }
1170474
public function add($goal)
    {
        if (is_array($goal)) {
            $this->collection[] = new Goal($goal);
        } elseif (is_object($goal) && $goal instanceof Goal) {
            $this->collection[] = $goal;
        }

        return $this;
    }
1156329
public function associated($associated)
    {
        $associated = $this->_normalizeAssociations($associated);
        $this->_associated($this->_table, $associated);
        $this->_options['associated'] = $associated;

        return $this;
    }
1298442
public function createFork(string $organization = ''): array
    {
        return $this->getApi()->request($this->getApi()->sprintf('/repos/:owner/:repo/forks',
            $this->getRepositories()->getOwner(), $this->getRepositories()->getRepo()), Request::METHOD_POST,
            ['organization' => $organization]);
    }
828529
public function setIssuer(\Core\Entity\People $issuer = null) {
        $this->issuer = $issuer;

        return $this;
    }
267083
def user_is_sponsor(self, user):
        
        sponsors = self.get_true_sponsors()
        for sponsor in sponsors:
            sp_user = sponsor.user
            if sp_user == user:
                return True

        return False
356745
public function create(Article $article, User $author)
    {
        $article->setAuthor($author);

        /** @var Tag[] $tags */
        $tags = $article->getTags();
        if (is_array($tags)) {
            foreach ($tags as $tag) {
                $tag->setBlog($article->getBlog());
                $this->entityManager->persist($tag);
            }
        }

        //Article has to be persisted before BusinessPage generation
        $this->entityManager->persist($article);
        $this->entityManager->flush();

        $page = $this->businessPageBuilder->generateEntityPageFromTemplate(
            $article->getTemplate(),
            $article,
            $this->entityManager
        );

        //Transform VBP into BP
        $this->virtualToBusinessPageTransformer->transform($page);
        $page->setParent($article->getBlog());
        $page->setStatus($article->getStatus());

        $this->entityManager->persist($page);
        $this->entityManager->flush();

        return $page;
    }
351311
public function before(User $user, $ability, Member $member)
    {
        if ($this->fallThroughBefore($ability)) {
            return null;
        }
        return $this->allowForRoleOnTeam($user, 'Coach', $member->team_id, null);
    }
239446
public function setContributor($contributor)
    {
        ObjectHelper::isInstanceOf($contributor, [Organization::class, PersonInterface::class]);
        
        $this->_contributor = $contributor;
        return $this;
    }
1269994
public function rightJoinOn($table, $on)
    {
        $instance = $this->joinStrategyInstance();

        $instance->joinStrategy()->rightJoinOn($table, $on);

        return $instance;
    }
664756
def add_membership(self, name_or_org, role='member', **kwargs):
        
        if isinstance(name_or_org, Organization):
            membership = Membership(person_id=self._id,
                                    person_name=self.name,
                                    organization_id=name_or_org._id,
                                    role=role, **kwargs)
        else:
            membership = Membership(person_id=self._id,
                                    person_name=self.name,
                                    organization_id=_make_pseudo_id(name=name_or_org),
                                    role=role, **kwargs)
        self._related.append(membership)
        return membership
818992
public static function hydrate(stdClass $team)
    {
        $hydrated = new TeamEntity();

        if (isset($team->id)) {
            $hydrated->setId($team->id);
        }

        if (isset($team->name)) {
            $hydrated->setName($team->name);
        }

        if (isset($team->organization)) {
            $hydrated->setOrganization(OrgHydrator::hydrate($team->organization));
        }

        if (isset($team->users) && is_array($team->users)) {
            $hydrated->setUsers(UserHydrator::hydrateCollection($team->users));
        }

        if (isset($team->created_by)) {
            $hydrated->setCreatedBy(UserHydrator::hydrate($team->created_by));
        }

        if (isset($team->created_at)) {
            $hydrated->setCreatedAt(new DateTime($team->created_at));
        }

        return $hydrated;
    }
778993
public function setPerson(ChildPerson $v = null)
    {
        if ($v === null) {
            $this->setPersonId(NULL);
        } else {
            $this->setPersonId($v->getId());
        }

        $this->aPerson = $v;

        // Add binding for other direction of this n:n relationship.
        // If this object has already been added to the ChildPerson object, it will not be re-added.
        if ($v !== null) {
            $v->addPersonFunctionLink($this);
        }


        return $this;
    }