Pop\Graph\Graph::adapter PHP Method

adapter() public method

Get the graph graphic adapter
public adapter ( ) : mixed
return mixed
    public function adapter()
    {
        return $this->adapter;
    }

Usage Example

 /**
  * Method to calculate which quadrant a point is in.
  *
  * @param  array $point
  * @param  array $center
  * @return int
  */
 protected function getQuadrant($point, $center)
 {
     $quad = 0;
     if ($this->graph->adapter() instanceof \Pop\Pdf\Pdf) {
         if ($point['x'] >= $center['x']) {
             $quad = $point['y'] >= $center['y'] ? 4 : 1;
         } else {
             $quad = $point['y'] >= $center['y'] ? 3 : 2;
         }
     } else {
         if ($point['x'] >= $center['x']) {
             $quad = $point['y'] <= $center['y'] ? 4 : 1;
         } else {
             $quad = $point['y'] <= $center['y'] ? 3 : 2;
         }
     }
     return $quad;
 }
All Usage Examples Of Pop\Graph\Graph::adapter