original_string: public function beforeSelect(Select $event)
      {
          if ($this->isLazyLoaded()) {
              return;
          }
  
          $fields = $this->getFieldsPrefixed();
          $table = $this->entityDescriptor->getTableName();
          $relateTable = $this->getParentTableName();
          $pmk = $this->getParentPrimaryKey();
  
          $onClause = "{$table}.{$this->getForeignKey()} = ".
              "{$relateTable}.{$pmk}";
  
          $query = $event->getQuery();
          $query->join($relateTable, $onClause, $fields, $relateTable);
      }
code: public function beforeSelect(Select $event)
      {
          if ($this->isLazyLoaded()) {
              return;
          }
  
          $fields = $this->getFieldsPrefixed();
          $table = $this->entityDescriptor->getTableName();
          $relateTable = $this->getParentTableName();
          $pmk = $this->getParentPrimaryKey();
  
          $onClause = "{$table}.{$this->getForeignKey()} = ".
              "{$relateTable}.{$pmk}";
  
          $query = $event->getQuery();
          $query->join($relateTable, $onClause, $fields, $relateTable);
      }
code_tokens: public function beforeSelect ( Select $ event ) { if ( $ this -> isLazyLoaded ( ) ) { return ; } $ fields = $ this -> getFieldsPrefixed ( ) ; $ table = $ this -> entityDescriptor -> getTableName ( ) ; $ relateTable = $ this -> getParentTableName ( ) ; $ pmk = $ this -> getParentPrimaryKey ( ) ; $ onClause = "{$table}.{$this->getForeignKey()} = " . "{$relateTable}.{$pmk}" ; $ query = $ event -> getQuery ( ) ; $ query -> join ( $ relateTable , $ onClause , $ fields , $ relateTable ) ; }
docstring: Handles the before select callback
  
  @param Select $event
docstring_tokens: Handles the before select callback