public function addVisitor(VisitorInterface $visitor, $priority = 0)
    {
        $this->sortedVisitors = null;

        $this->visitors[spl_object_hash($visitor)] = array(
            'priority' => $priority,
            'visitor' => $visitor
        );

        return $this;
    }
public function addVisitor(VisitorInterface $visitor, $priority = 0)
    {
        $this->sortedVisitors = null;

        $this->visitors[spl_object_hash($visitor)] = array(
            'priority' => $priority,
            'visitor' => $visitor
        );

        return $this;
    }
public function addVisitor ( VisitorInterface $ visitor , $ priority = 0 ) { $ this -> sortedVisitors = null ; $ this -> visitors [ spl_object_hash ( $ visitor ) ] = array ( 'priority' => $ priority , 'visitor' => $ visitor ) ; return $ this ; }
Add detection visitor

@param VisitorInterface $visitor
@param int              $priority

@return LanguageDetector
Add detection visitor