public function addMember(PrincipalInterface $pricipal)
    {

        // query whether or not the passed prinicpal is already a member
        $isMember = $this->members->exists($pricipal->getName());

        // if the principal is not a member, add it
        if ($isMember === false) {
            $this->members->add($pricipal->getName(), $pricipal);
        }

        // return if the principal has successfully been added
        return $isMember === false;
    }
public function addMember(PrincipalInterface $pricipal)
    {

        // query whether or not the passed prinicpal is already a member
        $isMember = $this->members->exists($pricipal->getName());

        // if the principal is not a member, add it
        if ($isMember === false) {
            $this->members->add($pricipal->getName(), $pricipal);
        }

        // return if the principal has successfully been added
        return $isMember === false;
    }
public function addMember ( PrincipalInterface $ pricipal ) { // query whether or not the passed prinicpal is already a member $ isMember = $ this -> members -> exists ( $ pricipal -> getName ( ) ) ; // if the principal is not a member, add it if ( $ isMember === false ) { $ this -> members -> add ( $ pricipal -> getName ( ) , $ pricipal ) ; } // return if the principal has successfully been added return $ isMember === false ; }
Adds the passed principal to the group.

@param \AppserverIo\Psr\Security\PrincipalInterface $pricipal The principal to add

@return boolean TRUE if the member was successfully added, FALSE if the principal was already a member
Adds the passed principal to the group .