Newscoop\Entity\Comment\Commenter::setIp PHP Method

setIp() public method

Set ip
public setIp ( string $ip ) : Newscoop\Entity\Comment\Commenter
$ip string
return Newscoop\Entity\Comment\Commenter
    public function setIp($ip)
    {
        // remove subnet & limit to IP_LENGTH
        $ip_array = explode('/', (string) $ip);
        $this->ip = substr($ip_array[0], 0, 39);
        return $this;
    }

Usage Example

 public function setIp($p_ip)
 {
     $this->__load();
     return parent::setIp($p_ip);
 }